I have two items in dropdown. I need to set initial value as first value from array below is my code
objects = ['production', 'development'];
this.object = this.objects[0];
<div class="item">
<select formControlName="db" class="form-control" (change)="changeDb($event)" [ngModel]="object">
<option *ngFor="let object of objects" [ngValue]="object">{{object}}</option>
</select>
</div>
The value is not setting using above code.It is showing in ng reflect model but not in UI