amitava82 / angular-multiselect

[NOT MAINTAINED]Native AngularJS multiselect directive
http://amitava82.github.io/angular-multiselect
MIT License
140 stars 124 forks source link

attrs.multiple is string, isn't it? #79

Open kityan opened 8 years ago

kityan commented 8 years ago

isMultiple = attrs.multiple ? true : false always true because attrs.multiple is string, no? here: https://github.com/amitava82/angular-multiselect/blob/master/src/multiselect.js#L41

amitava82 commented 8 years ago

You are right but then one would add multiple attribute for multi select and not add it for single select. However I think it can be enhanced to allow programmatic switching between single/multiselect.

kityan commented 8 years ago

Yes, definitely! I've not thinked about not adding attribute at all. That's because I use this method: if attribute can be ignored I write <element attr /> or <element attr="attr" />. But If <element attr="true"> than value has to be correctly transformed to Boolean.

Thanks for your directive. It was very helpful.