From a1d275e46973b4214f761a324fea34f5e2ed3ace Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Wed, 11 Jul 2018 13:02:44 +0800 Subject: [PATCH] 首页概览 --- src/app/routes/routes-routing.module.ts | 91 ++++++--------------------------------------- 1 files changed, 12 insertions(+), 79 deletions(-) diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index b271c92..15a58f2 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -1,92 +1,25 @@ -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 { 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'; +import { LayoutDefaultComponent } from "../layout/default/default.component"; const routes: Routes = [ { - path: '', + 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({ imports: [RouterModule.forRoot(routes, { useHash: environment.useHash })], - exports: [RouterModule], + exports: [RouterModule] }) export class RouteRoutingModule {} -- Gitblit v1.8.0