Angular 4 setting selected option in Dropdown

If you want to select a value based on true / false use

[selected]=”opt.selected == true”

 <option *ngFor="let opt of question.options" [value]="opt.key" [selected]="opt.selected == true">{{opt.selected+opt.value}}</option>

checkit out

Angular 2 – Setting selected value on dropdown list

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)