I'm trying to send the form data updated user data but not how it does not work
{ "name":"User", "status":1 }
How to say Angular what is it
<input type="text" [value]="user.name" name="name">
This is Input
service.ts
updateProductData(dataUrl, id){ let url = ${environment.endpoint}/${dataUrl}/${id} ; let header = new HttpHeaders() .set("Authorization", "Bearer " + this.token) .set("Accept", "application/json"); return this.http.put(url, { "name":"User", "status":1 },{ headers: header }); }
urlnot a string to use string templates, use the `character at the beginning and end of the line. Add an Observable <Response> response to functions. And where you call it, use the subscribe () method. - GVArt