Http in Ionic 2

Has anyone seen a tutorial or example HTTP get with the latest version of ionicBeta. My Apps depend on external JSON files to update information.

Here you go:

Be sure to check his blog for other ionic2 tutorials:

1 Like

Thanks a lot for the quick reply. i was missing the the

import ‘rxjs/add/operator/map’;

This really helped out a lot.

Hi guys,

Would you mind to tell me why is so important to have the “.map” between the .get and .subscribe in the request? What is the advantage?

Right now, I am doing a simple this.http.get(url).subscribe((data) => = data.json()) and it is working.

Just to let you know that I am new on that.


I have found depending on version/ release of AngularJS, map may or may not be required but as of the latest version I am using map works.

But what is the advantage?

kinda of a weak answer but I got it from the docs

and I figured they know more than I do.

Hi @icarus,
RXJS is a combination of Observables, Operators and Schedulers. Map is used to perform operations (if required) on the data obtained from observables. To understand in a best way check

Hope it will help you more