Last active
December 29, 2020 18:01
-
-
Save lydemann/85e452ed4c29f77f1f9aafde6311990f to your computer and use it in GitHub Desktop.
app.routing.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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