Ionic provider (Http.get)


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

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 ( {
// already loaded data
return Promise.resolve(;

// 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.
.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 = data;