Pasvaz/bindonce

Select ng-options

adamalbrecht opened this issue · 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.

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 ;)

+1 to bo-options

+1 me to