app.component_20241227155753.ts 1.2 KB

1234567891011121314151617181920212223242526272829
  1. import { Component } from '@angular/core';
  2. import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';
  3. import { RouterModule, Routes} from '@angular/router';
  4. import { PagePsysurveyComponent } from './page-psysurvey/page-psysurvey.component'; // 替换为你的实际路径
  5. import { PagePublishsurveyComponent } from './page-publishsurvey/page-publishsurvey.component'; // 替换为你的实际路径
  6. import { MyDriftBottleComponent } from './my-drift-bottle/my-drift-bottle.component';
  7. import { ThrowDriftBottleComponent } from './throw-drift-bottle/throw-drift-bottle.component';
  8. const routes: Routes = [
  9. { path: '', redirectTo: 'tabs/tab1', pathMatch: 'full' },
  10. { path: 'tabs/tab1', component: PagePsysurveyComponent },
  11. { path: 'tabs/publishsurvey', component: PagePublishsurveyComponent },
  12. { path:'tabs/throw-drift-bottle',component:ThrowDriftBottleComponent},
  13. { path:'tabs/my-drift-bottle',component:MyDriftBottleComponent}
  14. // 添加其他路由
  15. ];
  16. @Component({
  17. selector: 'app-root',
  18. templateUrl: 'app.component.html',
  19. standalone: true,
  20. imports: [IonApp, IonRouterOutlet, RouterModule],
  21. })
  22. export class AppComponent {
  23. constructor() {}
  24. }