My app-routing.module.ts:
{
path: 'conversation-tabs',
children: [
{
path: 'conv-conversation',
children: [
{
path: '',
loadChildren:
'/conv-conversation.module#ConvConversationPageModule',
}
]
},
{
path: 'conversation-files',
children: [
{
path: '',
loadChildren:
'/conversation-files.module#ConversationFilesPageModule',
}
]
},
{
path: '',
redirectTo: '/conversation-tabs/conv-conversation',
pathMatch: 'full'
}
]
}
HTML in conv-conversation.html:
<ion-toolbar>
<ion-tabs>
<ion-tab-bar slot="bottom" color="light">
<ion-tab-button tab="conv-conversation">
<ion-icon name="text"></ion-icon>
<ion-label>Messages</ion-label>
<ion-badge>{{ unreadMsgs }}</ion-badge>
</ion-tab-button>
<ion-tab-button tab="conversation-files">
<ion-icon name="folder"></ion-icon>
<ion-label>Files</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
This is how my process works:
Login -> Home -> Pick Conversation (contains button to go to conversation-tabs)
conversation-tabs
redirects to conv-conversation
which is going to act as the 'home' for my tabs. At the bottom of conv-conversation.html
is the HTML code above. When I click the conversation-files
button, I get this error:
ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'conversation-tabs/conv-conversation/conversation-files' Error: Cannot match any routes. URL Segment: 'conversation-tabs/conv-conversation/conversation-files'
I'm not really sure what the issue is since my routing is set. Am I missing something?