2018-06-13 18:34:10 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
|
2018-06-19 16:55:50 +02:00
|
|
|
import { LoginComponent } from './site/login/login.component';
|
|
|
|
import { ProjectorComponent } from './projector/projector.component';
|
|
|
|
import { ProjectorContainerComponent } from './projector/projector-container/projector-container.component';
|
|
|
|
import { SiteComponent } from './site/site.component';
|
|
|
|
import { StartComponent } from './site/start/start.component';
|
|
|
|
import { AgendaComponent } from './site/agenda/agenda.component';
|
|
|
|
import { MotionsComponent } from './site/motions/motions.component';
|
2018-06-13 18:34:10 +02:00
|
|
|
|
2018-06-19 16:55:50 +02:00
|
|
|
import { AuthGuard } from './core/services/auth-guard.service';
|
2018-06-13 18:34:10 +02:00
|
|
|
|
|
|
|
const routes: Routes = [
|
2018-06-16 18:05:46 +02:00
|
|
|
{ path: 'projector/:id', component: ProjectorComponent },
|
|
|
|
{ path: 'real-projector/:id', component: ProjectorContainerComponent },
|
2018-06-19 16:55:50 +02:00
|
|
|
{ path: 'login', component: LoginComponent },
|
2018-06-16 18:05:46 +02:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: SiteComponent,
|
2018-06-19 16:55:50 +02:00
|
|
|
canActivate: [AuthGuard],
|
2018-06-16 18:05:46 +02:00
|
|
|
children: [
|
|
|
|
{ path: '', component: StartComponent },
|
|
|
|
{ path: 'agenda', component: AgendaComponent },
|
2018-06-19 16:55:50 +02:00
|
|
|
{ path: 'motions', component: MotionsComponent }
|
2018-06-16 18:05:46 +02:00
|
|
|
]
|
|
|
|
},
|
2018-06-19 16:55:50 +02:00
|
|
|
{ path: '**', redirectTo: '' }
|
2018-06-13 18:34:10 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2018-06-16 18:05:46 +02:00
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
exports: [RouterModule]
|
2018-06-13 18:34:10 +02:00
|
|
|
})
|
2018-06-19 16:55:50 +02:00
|
|
|
export class AppRoutingModule {}
|