I’m getting a side effect from conditionally setting the rootpage.
[edit] after investigating, the problem exists without the if statement.
see video at 27 seconds. Top left of screen:
@App({
template: `
<ion-nav *ngIf="rootPage" swipeBackEnabled="true" id="nav" #content [root]="rootPage"></ion-nav>
`,
config: {}, // http://ionicframework.com/docs/v2/api/config/Config/
providers: []
})
export class MyApp implements OnInit, OnDestroy {
rootPage: any = HomePage;
constructor(
private app: IonicApp,
private platform: Platform,
private auth: AuthService
) {
if (this.auth.authenticated()) {
this.rootPage = HomePage;
} else {
this.rootPage = LoginPage;
}
}
}