Hello, I am a beginner in Angular and need to create an input field that looks like this:
https://i.sstatic.net/LUXfJ.png
Everything is going fine except for the Vorname placeholder at the top. How can I place it there?
Currently, I am utilizing Angular Materials.
<div class='grid-container-left'>
<mat-form-field appearance="outline">
<input matInput placeholder={{angeforderteVerfueger.request.vorname}} readonly>
</mat-form-field>
</div>
Thank you in advance!
Answer:
The solution provided below should work; just add the floatLabel attribute with a value of "always".
<mat-form-field appearance="outline" floatLabel="always">
<mat-label>Vorname</mat-label>
<input matInput [placeholder]="angeforderteVerfueger.request.vorname" readonly>
</mat-form-field>