I'm using Ionic 3 , VS code IDE recently I came issue regards navigation to setRoot from root Tab page to another page (Home Page) without Top Tabs how could I achieve ?
app.component.ts
import { UserTabsPage } from '../pages/user-tab/user-tabs';
export class MyApp {
rootPage:any = UserTabsPage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {}
}
UserTabsPage.ts
export class UserTabsPage {
tab1Root = UserLoginPage;
tab2Root =LoginPage;
constructor() { }
}
UserTabsPage.html
<ion-content padding center text-center>
<ion-tabs tabsPlacement="top" >
<ion-tab [root]="tab1Root" tabTitle="User Login"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Phone Login"></ion-tab>
</ion-tabs> </ion-content>
userLogin.ts
import { RegisterPage } from '../register/register';
private registerPage(){
this.navCtrl.setRoot(RegisterPage );}
userLogin.html
> <button ion-button clear ion-button item-end icon-start color="dark"
> (click)="registerPage()" >Sign Up?</button>
My Register Page result :
My Expected Register Page Result: