|
@@ -1,20 +1,52 @@
|
|
|
-import { IonicModule } from '@ionic/angular';
|
|
|
-import { NgModule } from '@angular/core';
|
|
|
-import { CommonModule } from '@angular/common';
|
|
|
-import { FormsModule } from '@angular/forms';
|
|
|
-import { Tab1Page } from './tab1.page';
|
|
|
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
|
|
|
+import { Component, OnInit } from '@angular/core';
|
|
|
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonThumbnail, IonLabel } from '@ionic/angular/standalone';
|
|
|
|
|
|
-import { Tab1PageRoutingModule } from './tab1-routing.module';
|
|
|
+interface Recipe {
|
|
|
+ id: number;
|
|
|
+ title: string;
|
|
|
+ imageUrl: string;
|
|
|
+}
|
|
|
|
|
|
-@NgModule({
|
|
|
- imports: [
|
|
|
- IonicModule,
|
|
|
- CommonModule,
|
|
|
- FormsModule,
|
|
|
- ExploreContainerComponentModule,
|
|
|
- Tab1PageRoutingModule
|
|
|
- ],
|
|
|
- declarations: [Tab1Page]
|
|
|
+@Component({
|
|
|
+ selector: 'app-page-type',
|
|
|
+ templateUrl: './page-type.page.html',
|
|
|
+ styleUrls: ['./page-type.page.scss'],
|
|
|
+ standalone: true,
|
|
|
+ imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonThumbnail, IonLabel]
|
|
|
})
|
|
|
-export class Tab1PageModule {}
|
|
|
+export class PageTypePage implements OnInit {
|
|
|
+ categoryName: string = '意大利菜';
|
|
|
+
|
|
|
+ recipes: Recipe[] = [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ title: '经典意大利肉酱面',
|
|
|
+ imageUrl: 'https://images.unsplash.com/photo-1555949258-eb67b1ef0ceb'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ title: '奶油蘑菇意大利面',
|
|
|
+ imageUrl: 'https://images.unsplash.com/photo-1611270629569'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ title: '海鲜意大利面',
|
|
|
+ imageUrl: 'https://images.unsplash.com/photo-1516100882582-96c3a05fe590'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ title: '番茄罗勒意面',
|
|
|
+ imageUrl: 'https://images.unsplash.com/photo-1608755728476'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 5,
|
|
|
+ title: '千层面',
|
|
|
+ imageUrl: 'https://images.unsplash.com/photo-1611273426858'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ constructor() { }
|
|
|
+
|
|
|
+ ngOnInit() {
|
|
|
+ }
|
|
|
+}
|