fengxiang
2018-03-26 0e25153037b06851846e80cc745e518ba07bf7af
src/app/routes/routes-routing.module.ts
@@ -10,6 +10,7 @@
import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component';
import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component';
import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component';
import { ReportComponent } from './report/report.component';
import { UserLoginComponent } from 'app/routes/passport/login/login.component';
@@ -18,27 +19,32 @@
        path: '',
        component: LayoutDefaultComponent,
        children: [
            { path: '', redirectTo: 'dashboard/v1', pathMatch: 'full' },
            { path: '', redirectTo: 'dashboard/workplace', 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: 'reports', loadChildren: './reports/reports.module#ReportsModule' }
        ]
    },    // passport
    {
        path: 'passport',
        component: LayoutPassportComponent,
        children: [
            { path: 'login', component: UserLoginComponent }
            {data: {title: '登录页面'}, path: 'login', component: UserLoginComponent }
        ]
    },    // passport
    {
      path: 'report',
      component: ReportComponent,
      data: {title: '对比报表'}
    },
    { path: '**', redirectTo: 'dashboard' }
    { path: '**', redirectTo: 'passport/login' }
];
@NgModule({