2020-10-21 16:45:26 +02:00
|
|
|
import { Routes } from '@angular/router';
|
|
|
|
import { HomeComponent } from './core/components/home/home.component';
|
|
|
|
import { PollService } from './core/services/poll.service';
|
|
|
|
import { PageNotFoundComponent } from './shared/components/page-not-found/page-not-found.component';
|
2020-12-16 17:21:01 +01:00
|
|
|
import { SuccessComponent } from './features/administration/success/success.component';
|
2021-02-04 18:34:06 +01:00
|
|
|
import { WipTodoComponent } from './shared/components/ui/wip-todo/wip-todo.component';
|
2021-02-04 18:54:30 +01:00
|
|
|
import { CguComponent } from './features/shared/components/ui/static-pages/cgu/cgu.component';
|
|
|
|
import { LegalComponent } from './features/shared/components/ui/static-pages/legal/legal.component';
|
|
|
|
import { PrivacyComponent } from './features/shared/components/ui/static-pages/privacy/privacy.component';
|
2021-02-08 11:32:58 +01:00
|
|
|
import { CipheringComponent } from './features/shared/components/ui/static-pages/ciphering/ciphering.component';
|
2020-09-14 16:07:09 +02:00
|
|
|
|
|
|
|
export const routes: Routes = [
|
2021-05-18 11:21:40 +02:00
|
|
|
{ path: '', component: HomeComponent, data: { animation: 'HomePage' } },
|
2020-09-14 16:07:09 +02:00
|
|
|
{
|
|
|
|
path: 'user',
|
2020-10-21 16:45:26 +02:00
|
|
|
loadChildren: () => import('./features/user-profile/user-profile.module').then((m) => m.UserProfileModule),
|
2020-09-14 16:07:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'administration',
|
2021-05-18 11:21:40 +02:00
|
|
|
data: { animation: 'AdminPage' },
|
2020-09-14 16:07:09 +02:00
|
|
|
loadChildren: () =>
|
2020-10-21 16:45:26 +02:00
|
|
|
import('./features/administration/administration.module').then((m) => m.AdministrationModule),
|
2021-04-30 14:15:21 +02:00
|
|
|
// resolve: { poll: PollService },
|
2020-09-14 16:07:09 +02:00
|
|
|
},
|
|
|
|
{
|
2021-04-30 10:59:46 +02:00
|
|
|
path: 'poll/:custom_url/administration',
|
2020-09-14 16:07:09 +02:00
|
|
|
loadChildren: () =>
|
2020-10-21 16:45:26 +02:00
|
|
|
import('./features/administration/administration.module').then((m) => m.AdministrationModule),
|
2021-04-29 10:17:13 +02:00
|
|
|
// resolve: { poll: PollService },
|
2020-09-14 16:07:09 +02:00
|
|
|
},
|
|
|
|
{
|
2021-04-30 10:59:46 +02:00
|
|
|
path: 'poll/:custom_url/consultation',
|
2020-10-21 16:45:26 +02:00
|
|
|
loadChildren: () => import('./features/consultation/consultation.module').then((m) => m.ConsultationModule),
|
2021-04-30 14:15:21 +02:00
|
|
|
resolve: { poll: PollService },
|
2020-09-14 16:07:09 +02:00
|
|
|
},
|
|
|
|
{
|
2021-04-30 10:59:46 +02:00
|
|
|
path: 'poll/:custom_url/participation',
|
2020-10-21 16:45:26 +02:00
|
|
|
loadChildren: () => import('./features/participation/participation.module').then((m) => m.ParticipationModule),
|
2021-04-29 10:17:13 +02:00
|
|
|
// resolve: { poll: PollService },
|
2020-09-14 16:07:09 +02:00
|
|
|
},
|
2020-12-16 17:21:01 +01:00
|
|
|
{
|
|
|
|
path: 'success',
|
|
|
|
component: SuccessComponent,
|
|
|
|
},
|
2021-02-04 18:34:06 +01:00
|
|
|
{
|
|
|
|
path: 'todo',
|
|
|
|
component: WipTodoComponent,
|
|
|
|
},
|
2021-02-04 18:54:30 +01:00
|
|
|
{
|
|
|
|
path: 'cgu',
|
|
|
|
component: CguComponent,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'legal',
|
|
|
|
component: LegalComponent,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'privacy',
|
|
|
|
component: PrivacyComponent,
|
|
|
|
},
|
2021-02-08 11:32:58 +01:00
|
|
|
{
|
|
|
|
path: 'ciphering',
|
|
|
|
component: CipheringComponent,
|
|
|
|
},
|
2020-10-21 16:45:26 +02:00
|
|
|
{ path: 'page-not-found', component: PageNotFoundComponent },
|
|
|
|
{ path: '**', redirectTo: 'page-not-found', pathMatch: 'full' },
|
2020-09-14 16:07:09 +02:00
|
|
|
];
|