Skip to content

Commit

Permalink
feat(全局页面模块): 添加全局页面,配置页面路由
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayisheji committed Nov 7, 2017
1 parent cea24d4 commit d38b380
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/app/pages/pages-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LayoutsComponent } from '../shared';
const routes: Routes = [
{
path: '',
component: LayoutsComponent,
children: [
{
path: '',
redirectTo: '/dashboard/analysis',
pathMatch: 'full'
},
{
path: 'dashboard',
loadChildren: 'app/pages/dashboard/dashboard.module#DashboardModule'
},
{
path: 'form',
loadChildren: 'app/pages/form/form.module#FormModule'
},
{
path: 'list',
loadChildren: 'app/pages/list/list.module#ListModule'
},
{
path: 'profile',
loadChildren: 'app/pages/profile/profile.module#ProfileModule'
},
{
path: 'result',
loadChildren: 'app/pages/result/result.module#ResultModule'
},
{
path: 'exception',
loadChildren: 'app/pages/exception/exception.module#ExceptionModule'
},
]
},
{
path: 'user',
loadChildren: 'app/pages/user/user.module#UserModule'
},
{
path: '**',
redirectTo: '/exception/404',
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PagesRoutingModule { }
13 changes: 13 additions & 0 deletions src/app/pages/pages.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../shared';

import { PagesRoutingModule } from './pages-routing.module';


@NgModule({
imports: [
SharedModule,
PagesRoutingModule
]
})
export class PagesModule { }

0 comments on commit d38b380

Please sign in to comment.