Fixed the routing

This commit is contained in:
Sercan Yemen 2022-12-12 14:58:29 +03:00
parent ce0cce00d9
commit 104a1ceffb

View File

@ -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'
@ -67,8 +65,7 @@ export const appRoutes: Route[] = [
// Admin routes // Admin routes
{ {
path: '', path: '',
canActivate: [AuthGuard], canMatch: [AuthGuard],
canActivateChild: [AuthGuard],
component: LayoutComponent, component: LayoutComponent,
resolve: { resolve: {
initialData: InitialDataResolver, initialData: InitialDataResolver,