76ce18cfd8
- 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))
21 lines
700 B
TypeScript
21 lines
700 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { LoginComponent } from './site/login/login.component';
|
|
import { AuthGuard } from './core/services/auth-guard.service';
|
|
|
|
/**
|
|
* Global app routing
|
|
*/
|
|
const routes: Routes = [
|
|
{ path: 'login', component: LoginComponent },
|
|
{ path: 'projector', loadChildren: './projector-container/projector-container.module#ProjectorContainerModule' },
|
|
{ path: '', loadChildren: './site/site.module#SiteModule', canActivate: [AuthGuard] },
|
|
{ path: '**', redirectTo: '' }
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule {}
|