Angular 4 setting selected option in Dropdown

前端 未结 6 1058
渐次进展
渐次进展 2020-12-13 17:34

several questions about this and diffrent answeres. But none of them realy answeres the question. So again:

Setting default of a Dropdown select by value isnt workin

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 18:17

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

    [selected]="opt.selected == true"

     
    

    checkit out

    Angular 2 - Setting selected value on dropdown list

提交回复
热议问题