12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- import { TabsPage } from './tabs.page';
- import { NgModule } from '@angular/core';
- import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
- export const routes: Routes = [
- {
- path: 'tabs',
- component: TabsPage,
- children: [
- {
- path: 'tab1',
- loadComponent: () =>
- import('../tab1/tab1.page').then((m) => m.Tab1Page),
- },
- {
- path: 'tab2',
- loadComponent: () =>
- import('../tab2/tab2.page').then((m) => m.Tab2Page),
- },
- {
- path: 'tab3',
- loadComponent: () =>
- import('../tab3/tab3.page').then((m) => m.Tab3Page),
- },
- {
- path: 'tab4',
- loadComponent: () =>
- import('../tab4/tab4.page').then((m) => m.Tab4Page),
- },
- {
- path: 'picture',
- loadComponent: () =>
- import('../poem-picture/poem-picture.component').then((m) => m.PoemPictureComponent),
- },
- {
- path: 'inquiry/ai',
- loadComponent: () =>
- import('../page/page-inquiry/page-inquiry.component').then((m) => m.PageInquiryComponent),
- },
- {
- path: 'inquiry/human',
- loadComponent: () =>
- import('../page/inquiry-human/inquiry-human.component').then((m) => m.InquiryHumanComponent),
- },
- {
- path: 'page-test',
- loadComponent: () =>
- import('../page-test/page-test.component').then((m) => m.PageTestComponent),
- },
- {
- path: 'my-health', // 我的健康
- loadComponent: () =>
- import('../page/page-my-health/page-my-health.component').then((m) => m.PageMyHealthComponent),
- },
- {
- path: 'drug-category/:name',
- loadComponent: () =>
- import('../drug-category/drug-category.page').then(
- (m) => m.DrugCategoryPage
- ),
- },
- {
- path: 'ai-knowledge',
- loadComponent: () =>
- import('../page/page-ai-knowledge/page-ai-knowledge.component').then(
- (m) => m.PageAiKnowledgeComponent
- ),
- },
- {
- path: 'create-agent',
- loadComponent: () =>
- import('../page/page-create-agent/page-create-agent.component').then(
- (m) => m.PageCreateAgentComponent
- ),
- },
- {
- path: '',
- redirectTo: '/tabs/tab4',
- pathMatch: 'full'
- },
- ],
- },
- {
- path: '',
- redirectTo: '/tabs/tab4',
- pathMatch: 'full'
- }
- ];
- @NgModule({
- imports: [
- RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
- ],
- exports: [RouterModule]
- })
- export class AppRoutingModule { }
|