I'm trying to implement a dropdown list with ngfor, but I have two issue.
I don't get a default value selected on the first element. The array is having 4 element. With the first ngFor at the mat-select I want to select 4 items and the first item preferably being selected per default.
There is being shown an unwanted empty arrow (line) at the end.
could someone please suggest a better solution. This is my implementations, which I have done after browsing so many post on SO on this topic.
<mat-select *ngFor="let level of myArray; let i=index " placeholder="{{myArray[i+1].name}}">
<mat-option *ngFor="let child of level.children | keyvalue" value="{{child.value.name}}" >
{{child.value.name}}
</mat-option>
{{level.name}}
</mat-select>