modules.routes.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { NgModule } from '@angular/core';
  2. import { RouterModule, Routes } from '@angular/router';
  3. import { PageTextbookComponent } from './components/page-textbook/page-textbook.component';
  4. import { ApplyComponent } from './apply/apply.component';
  5. // import { ProfileComponent } from '../user/profile/profile.component';
  6. import { SpaceComponent } from './space/space.component'
  7. import { TextbookDetailsComponent } from '../common/textbook-details/textbook-details.component'
  8. import { RecycleComponent } from './recycle/recycle.component'
  9. const routes: Routes = [
  10. {
  11. path: '',
  12. redirectTo:'manage/space',
  13. pathMatch: "full",
  14. },
  15. {
  16. path: 'manage',
  17. children: [
  18. {
  19. path: 'space',//个人空间
  20. component: SpaceComponent,
  21. },
  22. {
  23. path: 'apply',//填写材料
  24. component: ApplyComponent,
  25. },
  26. {
  27. path: 'details/:id',//详情
  28. component: TextbookDetailsComponent,
  29. },
  30. {
  31. path: 'recycle',//回收站
  32. component: RecycleComponent,
  33. },
  34. ],
  35. },
  36. ];
  37. @NgModule({
  38. imports: [RouterModule.forChild(routes)],
  39. exports: [RouterModule],
  40. })
  41. export class NavAuthorRoutingModule {}