Ionic provider (Http.get)


#1

Following this tutorial to create a service for http.get
when creating provider on the terminal window. It is not creating the provider with some template code as mentioned in the tutorial here
Do i need to add some thing in the statement
ionic g provider PeopleService

http://blog.ionic.io/10-minutes-with-ionic-2-calling-an-api/

This class will have the basic boilerplate code inside of a load method to make an HTTP request.
I cant find this function in my service
load() {
if (this.data) {
// already loaded data
return Promise.resolve(this.data);
}

// don’t have the data yet
return new Promise(resolve => {
// We’re using Angular HTTP provider to request the data,
// then on the response, it’ll map the JSON data to a parsed JS object.
// Next, we process the data and resolve the promise with the new data.
this.http.get(‘path/to/data.json’)
.map(res => res.json())
.subscribe(data => {
// we’ve got back the raw data, now generate the core schedule data
// and save the data for later reference
this.data = data;
resolve(this.data);
});
});
}