Bug with NavController.present() in ionViewWillEnter


#1

Hello, i have an ionic 2 app, and in ionViewWillEnter method of Component, i call :

ionViewWillEnter() {
  let alert = Alert.create({   title: ...,     subTitle: ...,    buttons: [...]  });
  this.nav.present(alert);
} 

The Alert is showed, but after, nav.getActive() return null. So my back button (and other things) is broken. Sometimes, the component isn’t showed and the view is frozen.

Is it a bug? Or a problem with my code?

My dependancies :
“dependencies”: {
"@angular/common": “2.0.0-rc.1”,
"@angular/compiler": “2.0.0-rc.1”,
"@angular/core": “2.0.0-rc.1”,
"@angular/http": “2.0.0-rc.1”,
"@angular/platform-browser": “2.0.0-rc.1”,
"@angular/platform-browser-dynamic": “2.0.0-rc.1”,
"@angular/router": “2.0.0-rc.1”,
“es6-shim”: “0.35.0”,
“ionic-angular”: “2.0.0-beta.9”,
“ionic-native”: “1.3.0”,
“ionicons”: “3.0.0”,
“ng2-qrcode”: “^0.1.1”,
“ng2-translate”: “2.1.0”,
“reflect-metadata”: “0.1.3”,
“rxjs”: “5.0.0-beta.6”,
“zone.js”: “0.6.12”
}


Nav.present(alert) is not showing the alert
#2

I try to replace ionViewWillEnter() by ngOnInit(), but no change.


#3

can you put together a small demo?