I just upgraded my angular to v7.
How this happens:
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + localStorage.getItem('token')
})
};
var url = this.getEndpointUrl(endpoint);
return this.http.get(url, httpOptions).pipe(map(res => res.json()));
Getting error:
[ts] Property 'json' does not exist on type 'Object'. [2339]
any
What am I missing?