OpenSlides/client/src/app/site/site-routing.module.ts
FinnStutzenstein be9f98cfd0 App initialization
Used for internal apps as well as for plugins. The pluginpart is
currently missing, in fact that the main OpenSlides part is more
important. Apps can give their models and mainmenu entries.

Routes are not enabled, because the routes have to be static for webpack
to build the bundles. If we want to keep lazy loading, I see no
possibility to encapsulate the routes from the site-routing module.
2018-09-28 15:03:04 +02:00

56 lines
1.5 KiB
TypeScript

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: './settings/settings.module#SettingsModule'
},
{
path: 'users',
loadChildren: './users/users.module#UsersModule'
}
],
canActivateChild: [AuthGuard]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SiteRoutingModule {}