Ionic - unable to retrieve/display data using navcontroller

I am unable to display the data I get from NavParams. I use console.log() and check that I did get the data I wanted but unable to display in the new page.

I think I might had make some mistake during the passing of data, but not sure what did i do wrong.

Any help is appreciated. Thanks in advanced.

first.ts

import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { LocationsProvider } from '../../providers/locations/locations';

 constructor(
 public locations: LocationsProvider,
 public viewCtrl: ViewController,
 public navCtrl: NavController, 
 public actionSheetCtrl: ActionSheetController,
 public http: Http,
 public navParams: NavParams,
 ) {
 }

   newEntry(param){
    this.navCtrl.push('SecondPage',param);
}


    openActSheetjob_Type(){

    let actionsheet = this.actionSheetCtrl.create({

    title:"Type",
    buttons:[
        {
    text: 'Hour',
    handler: () => {

              let Hourly = "Hourly";  
              let results =  this.locations.getData(Hourly);
           
              console.log(results); // data goten

            this.newEntry({ record: results });   //Suspect mistake
          }
      }
   ]
 });
 actionsheetjob_type.present();
}

Second.html

<ion-list >

<ion-item *ngFor="let list of this.results">

  <h2>{{ list.Title }}</h2>
  <p>{{ list.Type }}</p>
  </ion-item>

</ion-list>

Second.Ts

     ionViewDidLoad(){
      console.log(this.NP.get("record")); //Get NULL
    }

locations.ts

 //function to get data
 data:any;

getData(jobType){

 if (this.data) {
  
  return Promise.resolve(this.data);
 }

  return new Promise(resolve => {

  this.http.get('http://localhost/getType.php?Type=' + Type)
  .map(res => res.json())
  .subscribe(data => {

    this.data = data;
    console.log(this.data);
    
    resolve(this.data);
  });

});

}

Your template will be evaluated before ionViewDidLoad() is called, so you cannot wait until that method to do necessary initialization.

Also, please please stop perpetuating that provider idiom. See this post for some information on some of the things that are wrong with it and a suggestion for an alternative.

In case you didn’t catch what he meant, if you type return new Promise, 99% of the time you’re doing something wrong.

Thank you for the comment. Will take note of that