I have the following problem
[ts] The 'json' property does not exist in the 'Object' type. any
This is the code:
postData(credentials,type){
return new Promise((resolve, reject) =>{
let headers = new HttpHeaders();
this.http.post(apiUrl+type, JSON.stringify(credentials), {headers: headers}).
subscribe(res =>{
resolve(res.json());
}, (err) =>{
reject(err);
});
});
}