From a3a8c23b196980732a795713a5eb5fe0c7075bf9 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Wed, 11 Jul 2018 21:47:13 +0800 Subject: [PATCH] Revert "提交" --- src/app/routes/routes-routing.module.ts | 91 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 79 insertions(+), 12 deletions(-) diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 15a58f2..b271c92 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -1,25 +1,92 @@ -import { NgModule } from "@angular/core"; -import { Routes, RouterModule } from "@angular/router"; -import { environment } from "@env/environment"; +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 { 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: "", + path: '', component: LayoutDefaultComponent, children: [ - { path: "", redirectTo: "home-page", pathMatch: "full" }, + { 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: "home-page", - loadChildren: "./home-page/home-page.module#HomePageModule" - } - ] - } + 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' }, ]; @NgModule({ imports: [RouterModule.forRoot(routes, { useHash: environment.useHash })], - exports: [RouterModule] + exports: [RouterModule], }) export class RouteRoutingModule {} -- Gitblit v1.8.0