app.routing.ts
const routes: Routes = [ | |
{ | |
path: ':schoolId', | |
resolve: [SchoolIdResolver], | |
children: [ | |
{ | |
path: '', | |
pathMatch: 'full', | |
redirectTo: 'courses' | |
}, | |
{ | |
path: 'courses', | |
resolve: [RedirectIfLoggedOutResolver] | |
children: [ | |
{ | |
path: '', | |
loadChildren: () => | |
import('./courses/courses.module').then(m => m.CoursesModule) | |
}, | |
{ | |
path: ':courseId', | |
loadChildren: () => | |
import('./course/course.module').then(m => m.CourseModule) | |
} | |
] | |
}, | |
{ | |
path: 'help', | |
resolve: [RedirectIfLoggedOutResolver], | |
loadChildren: () => import('./help/help.module').then(m => m.HelpModule) | |
}, | |
{ | |
path: 'profile', | |
resolve: [RedirectIfLoggedOutResolver], | |
loadChildren: () => | |
import('./profile/profile.module').then(m => m.ProfileModule) | |
}, | |
{ | |
path: 'help', | |
loadChildren: () => import('./help/help.module').then(m => m.HelpModule) | |
}, | |
{ | |
path: 'login', | |
loadChildren: () => | |
import('./login/login.module').then(m => m.LoginModule) | |
} | |
] | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment