use signal forms
This commit is contained in:
+40
-43
@@ -1,44 +1,41 @@
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<mat-form-field>
|
||||
<mat-label>Vorname</mat-label>
|
||||
<input matInput placeholder="Vorname" formControlName="vorname" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Nachname</mat-label>
|
||||
<input matInput placeholder="Nachname" formControlName="nachname" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Geschlecht</mat-label>
|
||||
<input matInput placeholder="Geschlecht" formControlName="geschlecht" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Passnummer</mat-label>
|
||||
<input matInput placeholder="Passnummer" formControlName="passnummer" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Geburtsdatum</mat-label>
|
||||
<input matInput [matDatepicker]="picker" formControlName="geburtsdatum" />
|
||||
<mat-hint>DD.MM.YYYY</mat-hint>
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Geburtsort</mat-label>
|
||||
<input matInput placeholder="Geburtsort" formControlName="geburtsort" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Unterrichtsvertrag?</mat-label>
|
||||
<mat-select matInput formControlName="uvertrag">
|
||||
<mat-option [value]="true">Ja</mat-option>
|
||||
<mat-option [value]="false">Nein</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Vereinsmitglied?</mat-label>
|
||||
<mat-select matInput formControlName="verein">
|
||||
<mat-option [value]="true">Ja</mat-option>
|
||||
<mat-option [value]="false">Nein</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" type="submit">Speichern</button>
|
||||
<form>
|
||||
<mat-form-field>
|
||||
<mat-label>Vorname</mat-label>
|
||||
<input matInput placeholder="Vorname" [field]="form.vorname" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Nachname</mat-label>
|
||||
<input matInput placeholder="Nachname" [field]="form.nachname" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Geschlecht</mat-label>
|
||||
<input matInput placeholder="Geschlecht" [field]="form.geschlecht" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Passnummer</mat-label>
|
||||
<input matInput placeholder="Passnummer" [field]="form.passnummer" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Geburtsdatum</mat-label>
|
||||
<input matInput [matDatepicker]="picker" [field]="form.geburtsdatum" />
|
||||
<mat-hint>DD.MM.YYYY</mat-hint>
|
||||
<mat-datepicker-toggle
|
||||
matIconSuffix
|
||||
[for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Geburtsort</mat-label>
|
||||
<input matInput placeholder="Geburtsort" [field]="form.geburtsort" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Vereinsmitglied?</mat-label>
|
||||
<mat-select matInput [field]="form.verein">
|
||||
<mat-option [value]="true">Ja</mat-option>
|
||||
<mat-option [value]="false">Nein</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" (click)="submit()">
|
||||
Speichern
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user