I was doing a test service and from my component when calling the service and wanting to add ".sucribe" it gave me an error that the method was not an observable ...
Searching on the internet I managed to solve the problem if in my service I added something like this using .map:
loadAll() {
return this.http.get(this.url)
.map(res => res.json());
}
When adding .map from the component if it worked well ".subscribe".
What I do not understand is what that .map does, search in google but I did not find info.
According to what the visual studio code shows me (in English) it is something that takes a result and creates an observable ... Could you please clarify what does this .map do?
Thank you very much