I am designing a form in Angular 2 using Angular Material. I have to assign a label for my input box. For that I need to use aria-label
.
This is my code, in which I have to apply the label before "Department" select box:
<mat-form-field >
<mat-select placeholder="Department" [(value)]="selecteddept" >
<mat-option *ngFor="let department of departments"
[value]="department.value">
{{ department.viewValue }}
</mat-option>
</mat-select>
</mat-form-field>
But I have confusion regarding its position in the code. Can anyone clear my confusion?