Modals / display


#1

Hi everyone, I have a set of items that are displayed in a list (ItemPage, item.ts, item.html). Each item has several components. I want to edit a selected item on a separate page (DetailsPage, details.ts, details.html) . I use modals to move between the two pages. Data transfer between items.ts and details.ts works as it should (though it looks ugle, see below).
However, I do not see the correct details.html page; only the title in the navbar. I suspect it has to do with the ionViewDidLoad, but I have no idea how to fix that :frowning:

thanks,

Andreas

=== code snippet
export class DetailsPage {

details: any;

constructor(private navCtrl: NavController, 
			public viewCtrl: ViewController, 
			public alertCtrl: AlertController, 
			public modalCtrl: ModalController, 
			public navParams: NavParams) {

  console.log(navParams.data.data);
  this.details = navParams.data.data;
  console.log('QuestionDetailsPage, constructor,',this.details)
}

ionViewDidLoad(){
  console.log('ionViewDidLoad',this.details)

}

}

== data transfer
export class ItemPage {

editDetails {

let modal = this.modalCtrl.create(DetailsPage,{data: selectedItem})

}
}

export class DetailsPage {

details: any;

constructor(private navCtrl: NavController, 
			public viewCtrl: ViewController, 
			public alertCtrl: AlertController, 
			public modalCtrl: ModalController, 
			public navParams: NavParams) {

  this.details = navParams.data.data;
}

}
.