html - Why 'ng-attr-' can't be used with attribute 'multiple'? -


i'm trying make <select> behave single or multiple selection depending on condition. far have tried:

<select   ng-model="data.model" ng-attr-multiple="{{mycondition ? '' : undefined}}"> 

(here's plnkr have been testing https://plnkr.co/edit/ackbmzsjc2mvsjadbgmy?p=preview)
won't work. leaving ng-attr-multiple alone won't work. missing here?

https://docs.angularjs.org/error/$compile/selmulti

binding multiple attribute of select element not supported since switching between multiple , single mode changes ngmodel object type instance array of instances breaks model semantics.

if need use different types of select elements in template based on variable, please use ngif or ngswitch directives select 1 of them used @ runtime.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -