2018-06-13 18:34:10 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
2018-06-19 16:55:50 +02:00
|
|
|
import { LoginComponent } from './site/login/login.component';
|
|
|
|
import { AuthGuard } from './core/services/auth-guard.service';
|
2018-06-13 18:34:10 +02:00
|
|
|
|
2018-07-23 16:42:17 +02:00
|
|
|
/**
|
|
|
|
* Global app routing
|
|
|
|
*/
|
2018-06-13 18:34:10 +02:00
|
|
|
const routes: Routes = [
|
2018-06-19 16:55:50 +02:00
|
|
|
{ path: 'login', component: LoginComponent },
|
2018-07-23 16:42:17 +02:00
|
|
|
{ path: 'projector', loadChildren: './projector-container/projector-container.module#ProjectorContainerModule' },
|
|
|
|
{ path: '', loadChildren: './site/site.module#SiteModule', canActivate: [AuthGuard] },
|
2018-06-19 16:55:50 +02:00
|
|
|
{ path: '**', redirectTo: '' }
|
2018-06-13 18:34:10 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2018-06-16 18:05:46 +02:00
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
exports: [RouterModule]
|
2018-06-13 18:34:10 +02:00
|
|
|
})
|
2018-06-19 16:55:50 +02:00
|
|
|
export class AppRoutingModule {}
|