app-routing.module.ts 678 Bytes
Newer Older
李彥志's avatar
李彥志 committed
1 2
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
李彥志's avatar
李彥志 committed
3
import { appPath } from 'src/app/app-path.const';
李彥志's avatar
李彥志 committed
4

李彥志's avatar
李彥志 committed
5 6 7 8 9 10 11 12 13 14 15 16
const routes: Routes = [
  {
    path: appPath.home,
    loadChildren: './home/home.module#HomeModule'
  },
  {
    path: appPath.p2,
    loadChildren: './p2/p2.module#P2Module'
  },
  {
    path: appPath.p3,
    loadChildren: './p3/p3.module#P3Module'
李彥志's avatar
李彥志 committed
17 18 19 20
  },
  {
    path: appPath.p4,
    loadChildren: './p4/p4.module#P4Module'
21 22 23 24
  },
  {
    path: appPath.p5,
    loadChildren: './p5/p5.module#P5Module'
李彥志's avatar
李彥志 committed
25 26
  }
];
李彥志's avatar
李彥志 committed
27 28 29 30 31 32

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }