2018-07-23 16:42:17 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
|
|
|
|
import { SiteComponent } from './site.component';
|
|
|
|
|
2018-08-28 11:07:10 +02:00
|
|
|
import { AuthGuard } from '../core/services/auth-guard.service';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Routung to all OpenSlides apps
|
|
|
|
*
|
|
|
|
* TODO: Plugins will have to append to the Routes-Array
|
|
|
|
*/
|
|
|
|
const routes: Routes = [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: SiteComponent,
|
|
|
|
children: [
|
2018-09-06 07:14:55 +02:00
|
|
|
{
|
|
|
|
path: '',
|
2018-09-20 13:03:51 +02:00
|
|
|
loadChildren: './common/common.module#CommonModule'
|
2018-09-06 07:14:55 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'agenda',
|
|
|
|
loadChildren: './agenda/agenda.module#AgendaModule'
|
|
|
|
},
|
2018-07-31 15:46:55 +02:00
|
|
|
{
|
|
|
|
path: 'assignments',
|
|
|
|
loadChildren: './assignments/assignments.module#AssignmentsModule'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'mediafiles',
|
|
|
|
loadChildren: './mediafiles/mediafiles.module#MediafilesModule'
|
|
|
|
},
|
2018-09-06 07:14:55 +02:00
|
|
|
{
|
|
|
|
path: 'motions',
|
|
|
|
loadChildren: './motions/motions.module#MotionsModule'
|
|
|
|
},
|
2018-07-31 15:46:55 +02:00
|
|
|
{
|
|
|
|
path: 'settings',
|
2018-09-18 15:51:57 +02:00
|
|
|
loadChildren: './config/config.module#ConfigModule'
|
2018-07-31 15:46:55 +02:00
|
|
|
},
|
2018-09-06 07:14:55 +02:00
|
|
|
{
|
|
|
|
path: 'users',
|
|
|
|
loadChildren: './users/users.module#UsersModule'
|
|
|
|
}
|
2018-08-28 11:07:10 +02:00
|
|
|
],
|
|
|
|
canActivateChild: [AuthGuard]
|
2018-07-23 16:42:17 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forChild(routes)],
|
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class SiteRoutingModule {}
|