2018-07-23 16:42:17 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
|
|
|
|
import { SiteComponent } from './site.component';
|
|
|
|
|
|
|
|
import { StartComponent } from './start/start.component';
|
2018-08-14 12:55:45 +02:00
|
|
|
import { PrivacyPolicyComponent } from './privacy-policy/privacy-policy.component';
|
|
|
|
import { LegalNoticeComponent } from './legal-notice/legal-notice.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: '',
|
|
|
|
component: StartComponent
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'legalnotice',
|
|
|
|
component: LegalNoticeComponent
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'privacypolicy',
|
|
|
|
component: PrivacyPolicyComponent
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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',
|
|
|
|
loadChildren: './settings/settings.module#SettingsModule'
|
|
|
|
},
|
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 {}
|