dev
Last change
on this file since 6738cc0 was f3c4950, checked in by Стојков Марко <mst@…>, 3 years ago |
Moderator can create categories
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import { NgModule } from '@angular/core';
|
---|
2 | import { Routes, RouterModule } from '@angular/router';
|
---|
3 | import { AuthCallbackComponent } from './auth-callback/auth-callback.component';
|
---|
4 | import { AuthorizedModeratorGuard } from './core/guards/authorized-moderator.guard';
|
---|
5 | import { AuthorizedGuard } from './core/guards/authorized.guard';
|
---|
6 |
|
---|
7 | const routes: Routes = [
|
---|
8 | {
|
---|
9 | path: 'questioning',
|
---|
10 | canActivate: [AuthorizedGuard],
|
---|
11 | loadChildren: () => import('./modules/questioning/questioning.module').then((x) => x.QuestioningModule)
|
---|
12 | },
|
---|
13 | {
|
---|
14 | path: 'moderating',
|
---|
15 | canActivate: [AuthorizedGuard, AuthorizedModeratorGuard],
|
---|
16 | loadChildren: () => import('./modules/moderating/moderating.module').then((x) => x.ModeratingModule)
|
---|
17 | },
|
---|
18 | {
|
---|
19 | path: 'auth-callback',
|
---|
20 | pathMatch: 'full',
|
---|
21 | component: AuthCallbackComponent
|
---|
22 | },
|
---|
23 | {
|
---|
24 | path: '',
|
---|
25 | pathMatch: 'full',
|
---|
26 | redirectTo: 'questioning/preview'
|
---|
27 | },
|
---|
28 | {
|
---|
29 | path: '**',
|
---|
30 | redirectTo: 'questioning/preview'
|
---|
31 | }
|
---|
32 | ];
|
---|
33 |
|
---|
34 | @NgModule({
|
---|
35 | imports: [RouterModule.forRoot(routes)],
|
---|
36 | exports: [RouterModule]
|
---|
37 | })
|
---|
38 | export class AppRoutingModule {}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.