-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility of an Angular plugin? #1118
Comments
I have only a casual familiarity with Angular. In what way would an Angular plugin be different than what exists in the repository now? |
I'm interested in this as well. It looks like you're writing Chosen in CoffeeScript and then building versions for jQuery and Prototype, yes? I doubt you'd be able to add Angular to that flow easily. You'd need to write a so-called "directive." |
Yeah i figured it out. Thank you very much.
|
Seems like this would be pretty straightforward, with the current flow. Right now there are several implementations, which based on my experience are broken in various ways. |
Would probably want to start by removing the jQuery dependency (which is a good idea regardless), then porting it over as a directive would be fairly painless! |
@theGeekPirate Implementing the cross-browser support without jQuery or Prototype would require much more work |
@stof I never said removing the jQuery dependency would be easy (although it wouldn't be terribly difficult), but we're starting to move away from DOM manipulation on the web so it's a good idea regardless, on top of being the first step to making it a directive for Angular (as removing external dependencies is recommended). I'm just starting with Angular, so it's quite possible that the JQuery Lite that Angular uses is enough to cover what chosen does, someone would probably want to look into that. |
well, how would you build chosen without dom manipulation ? It is mostly manipulating the DOM. |
That was a reference to not needing the full jQuery lib anymore, and is also the reason that Angular applications don't use it. EDIT: You should also look into how Angular is replacing regular DOM manipulation libraries, a quick google pulled up http://paulhammant.com/2012/03/03/replacing-jquery-with-angular, where he makes his code 95% smaller (obviously a unique case) by using Angular instead of jQuery, as well as making the javascript 80% smaller. |
No activity in here in the past 3 years, but an Angular version was never gonna happen. I bet there are plenty of options out there these days, though. |
I would love to see an angular plugin for this!
-- edit: I cant seem to find how to attach the label to this, but this is a feature request.
The text was updated successfully, but these errors were encountered: