尝试解决路由子问题但无法解决。如果我单击管理按钮不起作用,则不是管理部分的重定向。如何解决此问题。
演示:https ://stackblitz.com/edit/angular-3mngoh?file=src/app/approuting.module.ts
批准.module.ts:
const routes: Routes = [
{
path: 'admin',
component: AdminSectionComponent,
children: [
{ path: '', loadChildren: () => import('./adminsection/layout/layout.module').then(m => m.LayoutModule) },
{ path: 'login', loadChildren: () => import('./adminsection/login/login.module').then(m => m.LoginModule) },
{ path: 'signup', loadChildren: () => import('./adminsection/signup/signup.module').then(m => m.SignupModule) },
{ path: 'error', loadChildren: () => import('./adminsection/server-error/server-error.module').then(m => m.ServerErrorModule) },
{ path: 'access-denied', loadChildren: () => import('./adminsection/access-denied/access-denied.module').then(m => m.AccessDeniedModule) },
{ path: 'not-found', loadChildren: () => import('./adminsection/not-found/not-found.module').then(m => m.NotFoundModule) },
{ path: '**', redirectTo: 'not-found' }
]
},....etc