我想在UI路由器中使用具有未来状态的多级路由。
这是我尝试过的:
0级-状态:帐户。**
2级-状态:account.profile。**
const accountState = {
name: 'account',
url: '/account',
template: '<ui-view />'
}
const accountFutureState = {
name: 'account.**',
url: '/account',
loadChildren: () =>
import('account/account.js').then(mod => {
return mod.AccountModule;
})
}
const profileState = {
name: 'account.profile',
url: '/profile',
template: '<ui-view />'
}
const profileFutureState = {
name: 'account.profile.**',
url: '/profile',
loadChildren: () =>
import('account/profile.js').then(mod => {
return mod.ProfileModule;
})
}
尝试此操作时,它在控制台中显示以下输出,并且路由不起作用。
stateMatcher.find: Found multiple matches for account.profile.details using glob: (2) ["account.**", "account.profile.**"]