AngularJS null value for select

后端 未结 9 928
攒了一身酷
攒了一身酷 2021-02-01 14:32

I couldn\'t find an elegant way for setting null values with a

9条回答
  •  悲&欢浪女
    2021-02-01 14:50

    You can use the ngOptions directive on the select. According to the documentation:

    Optionally, a single hard-coded element, with the value set to an empty string, can be nested into the

    It's obviously a better idea to define the options list directly in the controller.

提交回复
热议问题