From: Bastian Dehn Date: Mon, 6 Jun 2022 11:22:05 +0000 (+0200) Subject: add: subtitle and show them X-Git-Tag: v1.0^2~46 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=c7fe31063f5d307b5f4e084db8678c948010c30d;p=speisekarten-editor.git add: subtitle and show them --- diff --git a/src/app/app.component.html b/src/app/app.component.html index 147432f..5de8a5b 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -25,7 +25,8 @@ + id="addSubtitle" + (click)="addSubtitle()">Hinzufügen
@@ -42,4 +43,7 @@

{{title.Title}}

+
+

{{subtitle.Subtitle}}

+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 063ca36..a4bf9a9 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -47,4 +47,14 @@ export class AppComponent }); this.formTitleVisible = false; } + + public addSubtitle(): void + { + let lastIndex = this.foodcard.Titles.length - 1; + this.foodcard.Titles[lastIndex].Subtitles.push({ + Subtitle: this.subtitle, + Foods: [] + }); + this.formSubtitleVisible = false; + } }