admin 管理员组文章数量: 1184232
My app-routing.module.ts:
{
path: RouteConstant.INIT,
canActivate: [AuthGuard],
data: {
breadcrumb: TitleConstant.INIT,
title: TitleConstant.INIT,
parent: {
breadcrumb: TitleConstant.HOME,
breadcrumbUrl: RouteConstant.DASHBOARD,
},
roles: [Role.USER]
},
children: [
{
path: '',
loadChildren: () => import('./modules/init/init.module').then(m => m.InitModule),
},
{
path: RouteConstant.CONTACT,
loadChildren: () => import('./modules/contact/contact.module').then(m => m.ContactModule),
data: {
title: TitleConstant.CONTACTS,
breadcrumb: TitleConstant.CONTACTS
},
}
My contact-routing.module.ts (children route):
const routes: Routes = [{
path: '',
children: [
{
path: '',
redirectTo: RouteConstant.CONTACT_LIST,
pathMatch: 'full',
},
{
path: RouteConstant.CONTACT_LIST,
component: ContactMainComponent,
data: {
breadcrumb: ''
},
},{
path: RouteConstant.CONTACT_PROFILE_WITH_CLIENT_ID,
component: ContactProfileComponent,
resolve: {
breadcrumb: BreadcrumbResolver
}
}]
when I click the CONTACT breadcrumb it should redirect to RouteConstant.CONTACT_LIST (/contact/list), the url changed but the component is not initializing, why?
本文标签: Angular url changed but the page is not reloadingStack Overflow
版权声明:本文标题:Angular, url changed but the page is not reloading - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1737313808a1815792.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论