File was renamed from src/app/routes/routes.ts |
| | |
| | | import { LayoutComponent } from '../layout/layout.component'; |
| | | import { NgModule } from '@angular/core'; |
| | | import { Routes, RouterModule } from '@angular/router'; |
| | | import { environment } from '@env/environment'; |
| | | // layout |
| | | import { LayoutDefaultComponent } from '../layout/default/default.component'; |
| | | import { LayoutFullScreenComponent } from '../layout/fullscreen/fullscreen.component'; |
| | | import { LayoutPassportComponent } from '../layout/passport/passport.component'; |
| | | // dashboard pages |
| | | import { DashboardV1Component } from './dashboard/v1/v1.component'; |
| | | import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component'; |
| | | import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component'; |
| | | import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component'; |
| | | |
| | | export const routes = [ |
| | | |
| | | const routes: Routes = [ |
| | | { |
| | | path: '', |
| | | component: LayoutComponent, |
| | | component: LayoutDefaultComponent, |
| | | children: [ |
| | | { path: '', redirectTo: 'dashboard/analysis', pathMatch: 'full' }, |
| | | { path: '', redirectTo: 'dashboard/v1', pathMatch: 'full' }, |
| | | { path: 'dashboard', redirectTo: 'dashboard/v1', pathMatch: 'full' }, |
| | | { path: 'dashboard/v1', component: DashboardV1Component, data: { translate: 'dashboard_v1' } }, |
| | | { path: 'dashboard/analysis', component: DashboardAnalysisComponent, data: { translate: 'dashboard_analysis' } }, |
| | | { path: 'dashboard/monitor', component: DashboardMonitorComponent, data: { translate: 'dashboard_monitor' } }, |
| | | { path: 'dashboard/workplace', component: DashboardWorkplaceComponent, data: { translate: 'dashboard_workplace' } }, |
| | | |
| | | { path: 'users', loadChildren: './users/users.module#UsersModule' }, |
| | | { path: 'devices', loadChildren: './devices/devices.module#DevicesModule' }, |
| | | { path: 'sensors', loadChildren: './sensors/sensors.module#SensorsModule' }, |
| | | { path: 'systems', loadChildren: './systems/systems.module#SystemsModule' }, |
| | | |
| | | { path: 'dashboard/v1', component: DashboardV1Component, data: { translate: 'dashboard_v1' } }, |
| | | { path: 'dashboard/analysis', component: DashboardAnalysisComponent, data: { translate: 'dashboard_analysis' } }, |
| | | { path: 'dashboard/monitor', component: DashboardMonitorComponent, data: { translate: 'dashboard_monitor' } }, |
| | | { path: 'dashboard/workplace', component: DashboardWorkplaceComponent, data: { translate: 'dashboard_workplace' } } |
| | | ] |
| | | }, |
| | | { path: '**', redirectTo: 'dashboard' } |
| | | ]; |
| | | |
| | | @NgModule({ |
| | | imports: [RouterModule.forRoot(routes, { useHash: environment.useHash })], |
| | | exports: [RouterModule] |
| | | }) |
| | | export class RouteRoutingModule { } |