I am having a little bit of trouble creating my Angular 2 form and converting the submitted data into JSON format for the use of submitting it to my API. I am looking for someth
You can use JSON.stringify(form.value):
JSON.stringify(form.value)
submit() { let resource = JSON.stringify(this.form.value); console.log('Add Button clicked: ' + resource); this.service.create(resource) .subscribe(response => console.log(response)); }
Result in Chrome DevTools: