我更新到 Anglar 15,我遇到了重定向问题,根据错误提示,我有一个双 //,但实际情况是我的代码中没有类似的内容。
const routes: Routes = [
{
path: "",
redirectTo: "dashboard",
pathMatch: "full",
},
{
path: '/',
loadChildren: () => import('./pages.module').then(module => module.PagesModule)
},
const routes: Routes = [
{
path: '',
redirectTo: "pages",
pathMatch: 'full'
},
{
path: 'login',
loadChildren: () => import('./login-page/login-page.module').then(module => module.LoginPageModule)
},
{
path: 'pages',
canLoad: [AuthGuard],
loadChildren: () => import('./pages/pages.module').then(module => module.PagesModule),
},
我还尝试从 PagesRoutingModule 内的路径中删除“/”,但这会循环我的应用程序。