I have a problem with HTTP in Angular.
I just want to GET
a JSON
list and show it in the view.
im
For Angular versions 5 and above, the updated importing line looks like :
import { map } from 'rxjs/operators';
OR
import { map } from 'rxjs/operators';
Also these versions totally supports Pipable Operators so you can easily use .pipe() and .subscribe().
If you are using Angular version 2, then the following line should work absolutely fine :
import 'rxjs/add/operator/map';
OR
import 'rxjs/add/operators/map';
If you still encounter a problem then you must go with :
import 'rxjs/Rx';
I won't prefer you to use it directly bcoz it boosts the Load time, as it has a large number of operators in it (useful and un-useful ones) which is not a good practice according to the industry norms, so make sure you try using the above mentioned importing lines first, and if that not works then you should go for rxjs/Rx