我的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'
}
]
}
conv-conversation.html中的 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>
这就是我的流程的工作方式:
Login -> Home -> Pick Conversation (contains button to go to conversation-tabs)
conversation-tabs
重定向到conv-conversation
哪个将充当我的标签的“家”。底部conv-conversation.html
是上面的 HTML 代码。当我单击conversation-files
按钮时,我收到此错误:
ERROR 错误:未捕获(在承诺中):错误:无法匹配任何路由。URL 段:'conversation-tabs/conv-conversation/conversation-files' 错误:无法匹配任何路由。URL 段:'conversation-tabs/conv-conversation/conversation-files'
我不太确定问题是什么,因为我的路由已设置。我错过了什么吗?