I am trying to put a default option in my select that comes from a service.
My Select.
<select (change)="changeValue()" [(ngModel)]="selectedValue">
<option *ngFor="let item of items" [ngValue]="item">{{ item.article }} - {{ item.value }}</option>
</select>
The array that I am passing to the ngFor.
items: Array<any> =
[{ article: 'item1', value: 10 },{ article: 'item2', value: 20 }]
When I load this component in my app, I receive from the database an object that contains one of these options.
So what I would like to do is, the option that I receive, set it as default.
I tried with [selected] but it is not working. How can I do it?