I have this logic inside app.component:
rootPage: any: LoginPage;
....
platform.ready().then(() => {
// Here we will check if the user is already logged in
// because we don't want to ask users to log in each time they open the app
let env = this;
this.nativeStorage.getItem('user')
.then( function (data) {
// user is previously logged and we have his data
// we will let him access the app
env.nav.push(UserPage); // Here i want to redirect user to TAB not to PAGE.
env.splashScreen.hide();
}, function (error) {
//we don't have the user data so we will ask him to log in
env.nav.push(LoginPage);
env.splashScreen.hide();
});
this.statusBar.styleDefault();
});
What i want to do is to redirect user from this login page to specific Tab.
tab1Root = OnePage;
tab2Root = TwoPage;
tab3Root = ThreePage;
.....