Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

After login, app is not redirecting to tabspage in ionic 4 (IOS)

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>