InterviewSolution
Saved Bookmarks
| 1. |
How do you configure routes for tabs in an ionic app ? |
|
Answer» src/APP/tabs/ FOLDER will have a tabs.router.module.ts FILE. Similar to Angular app routing module , ROUTES can be configured for tabs in this file. Routes can be configured for tabs as below : const routes: Routes = [ { PATH: 'tabs', component: TabsPage, children: [ { path: 'tab1', children: [ { path: '', loadChildren: '../tab1/tab1.module#Tab1PageModule' } ] }, { path: 'tab2', children: [ { path: '', loadChildren: '../tab2/tab1.module#Tab2PageModule' } ] }, { path: 'tab3', children: [ { path: '', loadChildren: '../tab3/tab3.module#Tab3PageModule' } ] }, { path: '', redirectTo: '/tabs/tab1', pathMatch: 'full' } ] } ]; |
|