I have the following request in a service in angular 9 :
getUsers(value: string, offset = 0) {
return this.http.get<GetUsers>(`users`);
}
This allow me to subscribe and fetch the result in the component, but my service can't fetch the data.
I would like that this function will execute the request, read the response and then return the observable to the component
I tried
return this.http.get<GetUsers>(`users`)
.map(res => {
//do my stuff
return res;
});
but I have >Property 'map' does not exist on type 'Observable
I tried using
.pipe(
map(res => {
console.log(res)
return res;
})
);
but it say there is no map did you mean Map ?