From: Bastian Dehn Date: Mon, 6 Jun 2022 12:36:09 +0000 (+0200) Subject: add: remove one food and fix new food refs X-Git-Tag: v1.0^2~43 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=d8b112bb862ac94bd3227016dc46a6e20e1184c1;p=speisekarten-editor.git add: remove one food and fix new food refs --- diff --git a/src/app/app.component.html b/src/app/app.component.html index 5f965b8..2323d82 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -48,10 +48,12 @@

{{title.Title}}

{{subtitle.Subtitle}}

-
+
{{food.Food}}
{{food.sideDish}}
{{food.price}}
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 9eeab51..0432c23 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -84,6 +84,12 @@ export class AppComponent { let lastSubtitle = this.getLastSubtitle(); lastSubtitle.Foods.push(this.food); + this.food = { Food: "", sideDish: "", price: "" }; + } + + public removeFood(subtitle: ISubtitle, foodindex: number): void + { + subtitle.Foods.splice(foodindex, 1); } private getLastTitle(): ITitle