Ionic-cli: Bug in PageModule ???

Created on 8 May 2017  路  2Comments  路  Source: ionic-team/ionic-cli

_From @ThunderBirdsX3 on May 8, 2017 6:17_

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I try to use PageModule for navigation to page. this.navCtrl.push('Page') or this.navCtrl.setRoot('Page').
That good, Because I didn't to import page in app.module.ts. But when i use command ionic run ios -l -c and save or reload app. It stuck in old page.

In app.component.ts I set rootPage:any = 'Loading';. This loading.ts has some logic about check database SQLlite. After check data it would take to other page this.navCtrl.setRoot('Login') or this.navCtrl.setRoot('Tabs') with data from database.

And yes, When i save the code or reload app. It will not load 'Loading' page first. It will go to last page from navController and I will not get data from Loading page.

Expected behavior:
If I use old way. ( Import page to app.module.ts) Every thing is fine. After save the code or reload app. It will start with Loading page first. Not stuck in last navController.

Steps to reproduce:

Related code:

Good.

this.navCtrl.setRoot(Tabs)
this.navCtrl.push(SomePage)

Not good.

this.navCtrl.setRoot('Tabs')
this.navCtrl.push('SomePage')

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 7.0.0 
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: 1.9.1 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v6.9.5
Xcode version: Xcode 8.3.2 Build version 8E2002

_Copied from original issue: driftyco/ionic#11550_

Most helpful comment

@jgw96 This does not look like a CLI related issue to me.

All 2 comments

_From @SusanKern on May 8, 2017 12:35_

I am experiencing this same problem.

@jgw96 This does not look like a CLI related issue to me.

Was this page helpful?
0 / 5 - 0 ratings