I have a bunch of select lists and I\'m trying to add a \"none\" and a title option to them. The code looks like so:
It's impossible with ngOptions, as explicitly mentioned in the documentation (emphasis mine):
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.
If you want, you can manually construct the options list with the ngRepeat directive:
But I would strongly advice against that, as it's absolutely not semantic: your title isn't an option. Do you have contemplate to use a heading element, a