After login, the app is not navigating to tabspage in ionic 4, and this code working in android but not working in ios
tabs.router.module.ts code :
const routes: Routes = [
{
path: 'tabs',
component: TabsPage,
children: [
{
path: '',
redirectTo: '/tabs/(home:home)',
pathMatch: 'full',
},
{
path: 'home',
children: [
{
path: '',
loadChildren: '../home/home.module#HomePageModule'
}
]
},
{
path: 'notificationhistory',
children: [
{
path: '',
loadChildren: '../notificationhistory/notificationhistory.module#NotificationhistoryPageModule'
}
]
},
{
path: 'chat',
children: [
{
path: '',
loadChildren: '../live-chat/live-chat.module#LiveChatPageModule'
}
]
},
{
path: 'contact',
children: [
{
path: '',
loadChildren: '../contact/contact.module#ContactPageModule'
}
]
}
]
},
{
path: '',
redirectTo: '/tabs/home',
pathMatch: 'full'
}
];
app-routing.module.ts code :
const routes: Routes = [
{ path: '', redirectTo:'login',pathMatch:'full' },
{ path: 'login', loadChildren: './login/login.module#LoginPageModule' },
{ path: '', loadChildren: './tabs/tabs.module#TabsPageModule',canActivate:[AuthGuardService] }
]
to navigate I use following code:
this.navctrl.navigateRoot(["tabs/home"]);
above code is working in android but not working in ios. page stuck at login page in ios but if I redirect to another page then tabpage then it works perfectly in ios
1 post - 1 participant