mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-09 12:05:08 +00:00
Fixed the routing
This commit is contained in:
parent
ce0cce00d9
commit
104a1ceffb
|
@ -12,9 +12,9 @@ export const appRoutes: Route[] = [
|
||||||
// Redirect empty path to '/example'
|
// Redirect empty path to '/example'
|
||||||
{path: '', pathMatch : 'full', redirectTo: 'example'},
|
{path: '', pathMatch : 'full', redirectTo: 'example'},
|
||||||
|
|
||||||
// Redirect signed in user to the '/example'
|
// Redirect signed-in user to the '/example'
|
||||||
//
|
//
|
||||||
// After the user signs in, the sign in page will redirect the user to the 'signed-in-redirect'
|
// After the user signs in, the sign-in page will redirect the user to the 'signed-in-redirect'
|
||||||
// path. Below is another redirection for that path to redirect the user to the desired
|
// path. Below is another redirection for that path to redirect the user to the desired
|
||||||
// location. This is a small convenience to keep all main routes together here on this file.
|
// location. This is a small convenience to keep all main routes together here on this file.
|
||||||
{path: 'signed-in-redirect', pathMatch : 'full', redirectTo: 'example'},
|
{path: 'signed-in-redirect', pathMatch : 'full', redirectTo: 'example'},
|
||||||
|
@ -22,8 +22,7 @@ export const appRoutes: Route[] = [
|
||||||
// Auth routes for guests
|
// Auth routes for guests
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
canActivate: [NoAuthGuard],
|
canMatch: [NoAuthGuard],
|
||||||
canActivateChild: [NoAuthGuard],
|
|
||||||
component: LayoutComponent,
|
component: LayoutComponent,
|
||||||
data: {
|
data: {
|
||||||
layout: 'empty'
|
layout: 'empty'
|
||||||
|
@ -40,8 +39,7 @@ export const appRoutes: Route[] = [
|
||||||
// Auth routes for authenticated users
|
// Auth routes for authenticated users
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
canActivate: [AuthGuard],
|
canMatch: [AuthGuard],
|
||||||
canActivateChild: [AuthGuard],
|
|
||||||
component: LayoutComponent,
|
component: LayoutComponent,
|
||||||
data: {
|
data: {
|
||||||
layout: 'empty'
|
layout: 'empty'
|
||||||
|
@ -55,25 +53,24 @@ export const appRoutes: Route[] = [
|
||||||
// Landing routes
|
// Landing routes
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component : LayoutComponent,
|
component: LayoutComponent,
|
||||||
data: {
|
data: {
|
||||||
layout: 'empty'
|
layout: 'empty'
|
||||||
},
|
},
|
||||||
children : [
|
children: [
|
||||||
{path: 'home', loadChildren: () => import('app/modules/landing/home/home.module').then(m => m.LandingHomeModule)},
|
{path: 'home', loadChildren: () => import('app/modules/landing/home/home.module').then(m => m.LandingHomeModule)},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// Admin routes
|
// Admin routes
|
||||||
{
|
{
|
||||||
path : '',
|
path: '',
|
||||||
canActivate: [AuthGuard],
|
canMatch: [AuthGuard],
|
||||||
canActivateChild: [AuthGuard],
|
component: LayoutComponent,
|
||||||
component : LayoutComponent,
|
resolve: {
|
||||||
resolve : {
|
|
||||||
initialData: InitialDataResolver,
|
initialData: InitialDataResolver,
|
||||||
},
|
},
|
||||||
children : [
|
children: [
|
||||||
{path: 'example', loadChildren: () => import('app/modules/admin/example/example.module').then(m => m.ExampleModule)},
|
{path: 'example', loadChildren: () => import('app/modules/admin/example/example.module').then(m => m.ExampleModule)},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user