import { NgModule } from '@angular/core'; import { ExtraOptions, RouterModule, Routes } from '@angular/router'; import { environment } from '@dafa-environment'; const routes: Routes = [ { path: '', data: { title: '' }, loadChildren: () => import('./pages/start/start.module').then(m => m.StartModule) }, { path: 'administration', data: { title: 'Administration' }, loadChildren: () => import('./pages/administration/administration.module').then(m => m.AdministrationModule) }, { path: 'mina-deltagare', data: { title: 'Mina deltagare' }, loadChildren: () => import('./pages/participants/participants.module').then(m => m.ParticipantsModule) }, { path: 'avrop', data: { title: 'Avrop' }, loadChildren: () => import('./pages/call-off/call-off.module').then(m => m.CallOffModule) }, { path: 'meddelanden', data: { title: 'Meddelanden' }, loadChildren: () => import('./pages/messages/messages.module').then(m => m.MessagesModule) }, { path: 'statistik', data: { title: 'Statistik' }, loadChildren: () => import('./pages/statistics/statistics.module').then(m => m.StatisticsModule) }, { path: 'installningar', data: { title: 'Inställningar' }, loadChildren: () => import('./pages/settings/settings.module').then(m => m.SettingsModule) }, { path: 'releases', data: { title: 'Releases' }, loadChildren: () => import('./pages/releases/releases.module').then(m => m.ReleasesModule) }, { path: 'ciam-landing', data: { title: 'Ciam landing page' }, loadChildren: () => import('./pages/ciam-landing/ciam-landing.module').then(m => m.CiamLandingModule) }, { path: 'logout', data: { title: 'Ciam landing page' }, loadChildren: () => import('./pages/logout/logout.module').then(m => m.LogoutModule) } ]; if (!environment.production) { routes.push({ path: 'mock-login', data: { title: 'Mock login' }, loadChildren: () => import('./pages/mock-login/mock-login.module').then(m => m.MockLoginModule) }); } routes.push({ path: '**', data: { title: 'Sidan hittas inte' }, loadChildren: () => import('./pages/page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) }); const options: ExtraOptions = { useHash: false }; @NgModule({ imports: [RouterModule.forRoot(routes, options)], exports: [RouterModule] }) export class AppRoutingModule { }