OpenSlides/client/src/app/site/site-routing.module.ts

68 lines
1.9 KiB
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SiteComponent } from './site.component';
import { AuthGuard } from '../core/services/auth-guard.service';
/**
* Routung to all OpenSlides apps
*
* TODO: Plugins will have to append to the Routes-Array
*/
const routes: Routes = [
{
path: '',
component: SiteComponent,
children: [
{
path: '',
loadChildren: './common/common.module#CommonModule'
},
{
path: 'agenda',
loadChildren: './agenda/agenda.module#AgendaModule'
},
{
path: 'assignments',
loadChildren: './assignments/assignments.module#AssignmentsModule'
},
{
path: 'mediafiles',
loadChildren: './mediafiles/mediafiles.module#MediafilesModule'
},
{
path: 'motions',
loadChildren: './motions/motions.module#MotionsModule'
},
{
path: 'settings',
loadChildren: './config/config.module#ConfigModule'
},
{
path: 'users',
loadChildren: './users/users.module#UsersModule'
2018-10-15 10:12:47 +02:00
},
{
path: 'tags',
loadChildren: './tags/tag.module#TagModule'
},
{
path: 'history',
loadChildren: './history/history.module#HistoryModule'
},
{
path: 'projector-site',
loadChildren: './projector/projector.module#ProjectorModule'
}
],
canActivateChild: [AuthGuard]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SiteRoutingModule {}