I am getting the below errors for the below function in Angular 6
public getList() {
return this.http.get(environment.serverUrl +'/vmsdata/v1/tftoport/customer/1001')
.toPromise()
.then(response => response.json()
.then(json => {
console.log('data', json.items);
return json.items;
});
}
For the line .then(response => response.json()
, Error is
[ts] Property 'json' does not exist on type 'Object'
.
For the line .then(json => {
Error is [ts] Parameter 'json' implicitly has an 'any' type.