app-routing.module.ts 528 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 17 18
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
19 20 21 22 23 24

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