modules.routes.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { NgModule } from "@angular/core";
  2. import { RouterModule, Routes } from "@angular/router";
  3. import { PageCollectionComponent } from "./page-collection/page-collection.component";
  4. import { PageHomeComponent } from './page-home/page-home.component';
  5. import { PageRoleComponent } from "./page-role/page-role.component";
  6. import { PageUserComponent } from "./page-user/page-user.component";
  7. const routes: Routes = [
  8. {
  9. path: 'home',
  10. component: PageHomeComponent,
  11. children:[
  12. // {
  13. // path: "",
  14. // redirectTo: "pay",
  15. // pathMatch: "full",
  16. // },
  17. ]
  18. },
  19. {
  20. path: 'manage',
  21. component: PageHomeComponent,
  22. children:[
  23. {
  24. path: 'user',//列表
  25. component: PageUserComponent,
  26. },
  27. {
  28. path: 'role',//列表
  29. component: PageRoleComponent,
  30. },
  31. {
  32. path: 'collection',//列表
  33. component: PageCollectionComponent,
  34. },
  35. ]
  36. }
  37. ];
  38. @NgModule({
  39. imports: [RouterModule.forChild(routes)],
  40. exports: [RouterModule],
  41. })
  42. export class NavAdminRoutingModule {}