leocaseiro / angular-chosen

AngularJS Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a AngularJS way
http://leocaseiro.github.io/angular-chosen/
MIT License
682 stars 248 forks source link

Init chosen when no ng directives attached #259

Closed milasevicius closed 5 years ago

VanTanev commented 5 years ago

Hello @milasevicius. Thanks for your contribution.

Can you please explain the reasoning behind this PR? I suspect that the goal is to allow chosen to be used without ng-model, which is a use case I could see some merit behind.

I would have to ask that you remove the extra natives dependency though.

milasevicius commented 5 years ago

I am working on a project which is written in AngularJS, but have some legacy forms w/o ng-model, thats why I added last initialisation statement.

I removed natives dependency

leocaseiro commented 5 years ago

Hi @milasevicius, thank you for your PR.

could you please show a demo with your use case? Perhaps a demo app at plunked or codepen?

Thanks

milasevicius commented 5 years ago

Hi,

Sorry it took a while to respond. As I mentioned before, this MR fixes chosen initialisation, when ngModel and / or ngOptions are not presented on <select></select>