app.routes.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { HttpClientModule } from '@angular/common/http';
  2. import { NgModule } from '@angular/core';
  3. import { PreloadAllModules, RouteReuseStrategy, RouterModule, Routes } from '@angular/router';
  4. import { IonicRouteStrategy } from '@ionic/angular';
  5. export const routes: Routes = [
  6. {
  7. path: '',
  8. loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes),
  9. },
  10. {
  11. path: 'story-generator',
  12. loadComponent: () => import('./story-generator/story-generator.page').then(m => m.StoryGeneratorPage)
  13. },
  14. {
  15. path: 'toolbox',
  16. loadComponent: () => import('./toolbox/toolbox.page').then(m => m.ToolboxPage)
  17. },
  18. {
  19. path: '',
  20. loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes),
  21. },
  22. {
  23. path: 'register',
  24. loadComponent: () => import('./register/register.page').then(m => m.RegisterPage)
  25. },
  26. {
  27. path: 'login',
  28. loadComponent: () => import('./login/login.page').then(m => m.LoginPage)
  29. },
  30. {
  31. path: 'short-generator',
  32. loadComponent: () => import('./short-generator/short-generator.page').then(m => m.ShortGeneratorPage)
  33. },
  34. {
  35. path: 'character',
  36. loadComponent: () => import('./character/character.page').then(m => m.CharacterPage)
  37. },
  38. {
  39. path: 'character-creator',
  40. loadComponent: () => import('./character-creator/character-creator.page').then(m => m.CharacterCreatorPage)
  41. },
  42. {
  43. path: 'chapter-generator',
  44. loadComponent: () => import('./chapter-generator/chapter-generator.page').then(m => m.ChapterGeneratorPage)
  45. },
  46. {
  47. path: 'character-detail/:id',
  48. loadComponent: () => import('./character-detail/character-detail.component').then(m => m.CharacterDetailComponent)
  49. },
  50. {
  51. path: 'tab1',
  52. loadComponent: () => import('./tab1/tab1.page').then(m => m.Tab1Page)
  53. },
  54. {
  55. path: 'world-setup',
  56. loadComponent: () => import('./world-setup/world-setup.page').then(m => m.WorldSetupPage)
  57. },
  58. {
  59. path: 'character-generator',
  60. loadComponent: () => import('./character-generator/character-generator.page').then(m => m.CharacterGeneratorPage)
  61. },
  62. {
  63. path: 'name-generator',
  64. loadComponent: () => import('./name-generator/name-generator.page').then(m => m.NameGeneratorPage)
  65. },
  66. {
  67. path: 'agent-create',
  68. loadComponent: () => import('./agent-create/agent-create.page').then( m => m.AgentCreatePage)
  69. },
  70. {
  71. path: 'atest',
  72. loadComponent: () => import('./atest/atest.page').then( m => m.AtestPage)
  73. }, {
  74. path: 'tab4',
  75. loadComponent: () => import('./tab4/tab4.page').then( m => m.Tab4Page)
  76. },
  77. {
  78. path: 'tab2',
  79. loadComponent: () => import('./tab2/tab2.page').then( m => m.Tab2Page)
  80. }
  81. ];
  82. @NgModule({
  83. imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }), HttpClientModule],
  84. exports: [RouterModule],
  85. providers: [
  86. { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  87. ],
  88. })
  89. export class AppRoutingModule { }