I have a problem with HTTP in Angular.
I just want to GET
a JSON
list and show it in the view.
im
The map you using here, is not the .map()
in javascript, it's Rxjs map function which working on Observables
in Angular...
So in that case you need to import it if you'd like to use map on the result data...
map(project: function(value: T, index: number): R, thisArg: any): Observable
Applies a given project function to each value emitted by the source Observable, and emits the resulting values as an Observable.
So simply import it like this:
import 'rxjs/add/operator/map';