I couldn\'t find an elegant way for setting null
values with a using AngularJS.
HTML :
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
element. This element will then represent the
null
or "not selected" option. See example below for demonstration.
It's obviously a better idea to define the options list directly in the controller.