From 6e95e54195235f650d748ae3e0f5718ad6a23556 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Wed, 11 Jul 2018 12:09:18 +0800 Subject: [PATCH] 框架调整 --- src/app/routes/routes-routing.module.ts | 80 +++------------------------------------ 1 files changed, 7 insertions(+), 73 deletions(-) diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index b271c92..84bc767 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -3,86 +3,20 @@ 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'; -// passport pages -import { UserLoginComponent } from './passport/login/login.component'; -import { UserRegisterComponent } from './passport/register/register.component'; -import { UserRegisterResultComponent } from './passport/register-result/register-result.component'; -// single pages -import { CallbackComponent } from './callback/callback.component'; -import { UserLockComponent } from './passport/lock/lock.component'; -import { Exception403Component } from './exception/403.component'; -import { Exception404Component } from './exception/404.component'; -import { Exception500Component } from './exception/500.component'; + const routes: Routes = [ { path: '', component: LayoutDefaultComponent, children: [ - { path: '', redirectTo: 'dashboard/v1', pathMatch: 'full' }, - { path: 'dashboard', redirectTo: 'dashboard/v1', pathMatch: 'full' }, - { path: 'dashboard/v1', component: DashboardV1Component }, - { path: 'dashboard/analysis', component: DashboardAnalysisComponent }, - { path: 'dashboard/monitor', component: DashboardMonitorComponent }, - { path: 'dashboard/workplace', component: DashboardWorkplaceComponent }, + { path: '', redirectTo: 'home-page', pathMatch: 'full' }, { - path: 'widgets', - loadChildren: './widgets/widgets.module#WidgetsModule', - }, - { path: 'style', loadChildren: './style/style.module#StyleModule' }, - { path: 'delon', loadChildren: './delon/delon.module#DelonModule' }, - { path: 'extras', loadChildren: './extras/extras.module#ExtrasModule' }, - { path: 'pro', loadChildren: './pro/pro.module#ProModule' }, - ], - }, - // ������������ - { - path: 'data-v', - component: LayoutFullScreenComponent, - children: [ - { path: '', loadChildren: './data-v/data-v.module#DataVModule' }, - ], - }, - // passport - { - path: 'passport', - component: LayoutPassportComponent, - children: [ - { - path: 'login', - component: UserLoginComponent, - data: { title: '������', titleI18n: 'pro-login' }, - }, - { - path: 'register', - component: UserRegisterComponent, - data: { title: '������', titleI18n: 'pro-register' }, - }, - { - path: 'register-result', - component: UserRegisterResultComponent, - data: { title: '������������', titleI18n: 'pro-register-result' }, - }, - ], - }, - // ���������������Layout - { path: 'callback/:type', component: CallbackComponent }, - { - path: 'lock', - component: UserLockComponent, - data: { title: '������', titleI18n: 'lock' }, - }, - { path: '403', component: Exception403Component }, - { path: '404', component: Exception404Component }, - { path: '500', component: Exception500Component }, - { path: '**', redirectTo: 'dashboard' }, + path: 'home-page', + loadChildren: './home-page/home-page.module#HomePageModule', + } + ] + } ]; @NgModule({ -- Gitblit v1.8.0