How do I set the value property in AngularJS' ng-options?

后端 未结 27 1179
感动是毒
感动是毒 2020-11-22 08:17

Here is what seems to be bothering a lot of people (including me).

When using the ng-options directive in AngularJS to fill in the options for a &

27条回答
  •  春和景丽
    2020-11-22 08:51

    You can do this:

    
    

    -- UPDATE

    After some updates, user frm.adiputra's solution is much better. Code:

    obj = { '1': '1st', '2': '2nd' };
    
    

提交回复
热议问题