Angularjs populate select options with json

前端 未结 4 1068
暗喜
暗喜 2021-02-09 04:54

I am looking to populate select option with values from a basic json array.

The example I have is a country select. Each country has an id element and a name plus other

4条回答
  •  情歌与酒
    2021-02-09 05:23

    In this above example you are missing value attribute change this value="{{country.countryId}}". try this

    
    

    and see the example click here

提交回复
热议问题