This is My Tabs routing.module.ts File Code.
const routes: Routes = [
{
path: ‘tabs’,
component: TabsPage,
children: [
{
path: ‘tab1’,
children: [
{
path: ‘’,
loadChildren: ‘…/tab1/tab1.module#Tab1PageModule’
}
]
},
{
path: ‘tab2’,
children: [
{
path: ‘’,
loadChildren: ‘…/tab2/tab2.module#Tab2PageModule’
}
]
},
{
path: ‘tab3’,
children: [
{
path: ‘’,
loadChildren: ‘…/tab3/tab3.module#Tab3PageModule’
}
]
},
{
path: ‘’,
redirectTo: ‘/tabs/tab1’,
pathMatch: ‘full’
}
]
},
{
path: ‘’,
redirectTo: ‘/tabs/tabs/tab1’,
pathMatch: ‘full’
}
];
And I Have One Button In Tab3 When i click The Button Move To Tab1.
Public nav:NavController Add it in the Constructor.
this.nav.navigateRoot(’/tabs/tab1’);
Using This code In Button Click Listener.
But Can’t Navigate Or Move To Tab1. What Will Do?