16 In rxjs 6 map operator usage has been changed now you need to Use it like this. import { map } from 'rxjs/operators'; myObservable .pipe(map(data => data * 2)) .subscribe(...) For the Angular 7v Change import 'rxjs/add/operator/map'; Save To import { map } from "rxjs/operators"; Save And return this.http.get('http://localhost/ionicapis/public/api/products') .pipe(map(res => res.json()));
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter