OpenSlides/client/src/app/site/site-routing.module.ts
Sean Engelhardt 76ce18cfd8 Add modules and lazy loading
- core modules contains core services
- shared module contains "dumb" components (directives, models)
  - used by nearly all modules
- site, it's children and projector are now feature modules
  - full lazy loading with independent routing
  - routing for children (extremely helpful for plugins (later))
2018-08-15 10:19:46 +02:00

36 lines
1.2 KiB
TypeScript

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SiteComponent } from './site.component';
import { StartComponent } from './start/start.component';
// import { LoginComponent } from './login/login.component';
/**
* Routung to all OpenSlides apps
*
* TODO: Plugins will have to append to the Routes-Array
*/
const routes: Routes = [
// { path: 'login', component: LoginComponent },
{
path: '',
component: SiteComponent,
children: [
{ path: '', component: StartComponent },
{ 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' }
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SiteRoutingModule {}