Error: Cannot match any routes. URL Segment: 'tabs'
in tabs.router.module.ts
remove the path:'tabs' under routes:Routes then the code will be like this. I am pasting the code from my file
const routes: Routes = [ {
path: '',
component: TabsPage,
children: [
{
path: 'tab1',
loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
},
{
path: 'tab2',
loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
},
{
path: 'tab3',
loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
},
{
path: '',
redirectTo: '/tabs/tab1',
pathMatch: 'full'
}
] }, ];
in app-routing.module.ts the code will be like this
const routes: Routes = [ {
path: 'login',
loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule) }, {
path: 'tabs',
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule) }, {
path : '',
redirectTo : 'login',
pathMatch : 'full' } ];
Replace these lines in tabs.router.module.ts
{
path: '',
redirectTo: '/tabs/tabs/(one:one)'
}
You have to add '/tabs' before final redirect.