From: Bastian Dehn Date: Mon, 6 Jun 2022 11:07:19 +0000 (+0200) Subject: add: title button add method X-Git-Tag: v1.0^2~48 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=f373405e075c337e50b8947c83c03023e0c1b0bb;p=speisekarten-editor.git add: title button add method --- diff --git a/src/app/app.component.html b/src/app/app.component.html index d556a0c..147432f 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -16,7 +16,8 @@ + id="addTitle" + (click)="addTitle()">Hinzufügen
@@ -38,3 +39,7 @@ type="button" id="addFood">Hinzufügen
+ +
+

{{title.Title}}

+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 49ca5ac..b56a235 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -38,4 +38,12 @@ export class AppComponent { this.formFoodVisible = !this.formFoodVisible; } + + public addTitle(): void + { + this.foodcard.Titles.push({ + Title: this.title, + Subtitles: [] + }); + } }