I was seeing the tutorial of ionic 2 and read the class of ItemDetailsPage which is a child page in a ListPage:
@Component({
templateUrl: 'item-details.html'
})
export class ItemDetailsPage {
selectedItem: any;
constructor(public navCtrl: NavController, public navParams: NavParams) {
// If we navigated to this page, we will have an item available as a nav param
this.selectedItem = navParams.get('item');
}
}
but I don’t see any codes to pass the navCtrl to ItemDetailsPage,instead I only see
itemTapped(event, item) {
this.navCtrl.push(ItemDetailsPage, {
item: item
});
}
, where is the place to pass the current navigation controller to the child page?