|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <h1>Einkaufszettel</h1>
- <app-blog-entry *ngFor="let entry of entries" [entry]="entry"></app-blog-entry>
- <h2>Neuen Einkaufszettel Eintrag anlegen:</h2>
-
- <div class="form">
-
- <div class="control">
- <label for="title">Titel:</label>
- <input type="text" id="title" #title/>
- </div>
- <div class="control">
- <label for="title">Bild-URL:</label>
- <input type="text" id="image" #image/>
- </div>
- <div class="container">
- <div class="row custom-wrapper">
- <div class="col-md-12">
- <!-- Form starts -->
- <form [formGroup]="registrationForm" (ngSubmit)="onSubmit()">
- <div class="group-gap">
- <div class="d-block my-3">
- <div class="mb-3">
- <select class="custom-select" (change)="changeKategorie($event)" formControlName="kategorieName">
- <option value="">Wählen sie eine Kategorie</option>
- <option *ngFor="let kategorie of Kategorien" [ngValue]="kategorie">{{kategorie}}</option>
- </select>
- <!-- error block -->
- <div class="invalid-feedback" *ngIf="isSubmitted && kategorieName.errors?.required">
- <sup>*</sup>Bitte geben sie eine Kategorie ein!
- </div>
- </div>
- </div>
- </div>
- <!-- Submit Button -->
- <button type="submit" class="btn btn-danger btn-lg btn-block">Speichern</button>
- </form><!-- Form ends -->
- </div>
- </div>
- </div>
- <div class="control">
- <label for="title">Kategorie:</label>
- <input type="text" id="kategorie" #kategorie/>
- </div>
- <div class="control">
- <label for="text">Text:</label>
- <textarea id="text" cols="20" rows="3" #text>
- </textarea>
- </div>
- <div>
- <button (click)="createBlogEntry(title.value, image.value, kategorie.value, text.value)">
- Blog-Eintrag anlegen
- </button>
- </div>
- </div>
|