Add two extra options to a select list with ngOptions on it

前端 未结 2 1154
死守一世寂寞
死守一世寂寞 2020-12-20 17:39

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:

 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


提交回复
热议问题