After upgrading to Angular 15, I encountered an issue with the redirect functionality. The error message points out a double slash "//" in my code, but upon inspection, I couldn't find any such occurrence.
* *
PagesRoutingModule:
const routes: Routes = [
{
path: "",
redirectTo: "dashboard",
pathMatch: "full",
},
{
path: '/',
loadChildren: () => import('./pages.module').then(module => module.PagesModule)
},
* *
AppRoutingModule**
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),
},
I attempted to remove the '/' from the path in my PagesRoutingModule, but it resulted in a loop in my application.