account.modules.routes.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { NgModule } from '@angular/core';
  2. import { RouterModule, Routes } from '@angular/router';
  3. import { AccountLogComponent } from './account-log/account-log.component';
  4. import { BankcardComponent } from './bankcard/bankcard.component';
  5. import { NoticeLogComponent } from './notice-log/notice-log.component';
  6. import { DetailComponent } from './order/detail/detail.component';
  7. import { OrderComponent } from './order/order.component';
  8. import { RechargeComponent } from './recharge/recharge.component';
  9. import { RecordsComponent } from './records/records.component';
  10. import { WattleComponent } from './wattle/wattle.component';
  11. import { WithdrawalComponent } from './withdrawal/withdrawal.component';
  12. import { RecDetailComponent } from './records/detail/detail.component';
  13. import { LeaveGuard } from '../../services/leave.guard';
  14. const routes: Routes = [
  15. {
  16. path: '',
  17. redirectTo: 'wattle',
  18. pathMatch: 'full',
  19. },
  20. {
  21. path: 'wattle', //钱包
  22. component: WattleComponent,
  23. },
  24. {
  25. path: 'bankcard',
  26. component: BankcardComponent,
  27. },
  28. {
  29. path: 'recharge',
  30. canDeactivate: [LeaveGuard],
  31. component: RechargeComponent,
  32. },
  33. {
  34. path: 'log',
  35. component: AccountLogComponent,
  36. },
  37. {
  38. path: 'order',
  39. component: OrderComponent,
  40. },
  41. {
  42. path: 'order/detail/:id',
  43. component: DetailComponent,
  44. },
  45. {
  46. path: 'noticelog',
  47. component: NoticeLogComponent,
  48. },
  49. {
  50. path: 'withdrawal',
  51. component: WithdrawalComponent,
  52. },
  53. {
  54. path: 'records',
  55. component: RecordsComponent,
  56. },
  57. {
  58. path: 'records/detail/:id',
  59. component: RecDetailComponent,
  60. },
  61. ];
  62. @NgModule({
  63. imports: [RouterModule.forChild(routes)],
  64. exports: [RouterModule],
  65. })
  66. export class AccountRoutingModule {}