bindonce icon indicating copy to clipboard operation
bindonce copied to clipboard

Select ng-options

Open adamalbrecht opened this issue 10 years ago • 3 comments

My most common use case for bindonce is a mostly-static list of options to go inside a select element, but I can't figure out how to do it properly.

I tried doing the following, but it stopped binding to my specified ngModel.

<select ng-model='state'>
  <option bindonce ng-repeat='state in states' bo-value='state.abbr' bo-text='state.name'></option>
</select>

Even if I do get this to work, it would be great if I there were a bo-options for use on select elements.

adamalbrecht avatar Mar 15 '14 15:03 adamalbrecht

I'm not very good at all this bindonce stuff, but I do think it's quite unnecessary to give each option a bindonce scope of its own. It would probably be better to move the bindonce to the <select> tag (<select bindonce ng-model='state'>).

Probably won't do anything about your issue, though, just a general comment. Sorry ;)

lorenzhs avatar Mar 15 '14 16:03 lorenzhs

+1 to bo-options

paivaric avatar Jun 12 '14 15:06 paivaric

+1 me to

FDiskas avatar Mar 04 '15 13:03 FDiskas