AngularJS null value for select

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

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

9条回答
  •  我在风中等你
    2021-02-01 15:02

    Without the possibility of using ng-options I present another fix.

    I've been battling this a couple of months now, using solutions presented on this question and I don't know how nobody posted this:

    
    

    This should work on Angular 1.6 and above for sure when you are using ng-repeat for options instead of ng-options.

    It's not ideal but since we are used to work on legacy code this simple fix could save your day.

提交回复
热议问题