-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Make use of jQuery configurable #608
Comments
+1 for that! Currently having the problem that in my environment a jQuery 1.4.1 is given and I don't want to rely on that crappy release. |
Hi Igor, What about checking for a global variable called angularjsUseJquery which can point to any jQuery instance, or if it's value is "internal", then point to jqLite inside angularjs? I can provide a pull request with this for review. |
Any reason why this can't happen? |
Discussion over here on a PR. |
@IgorMinar I have started working on this issue like you suggested here -> #2163 (comment) But, I'm confused about the following things-
|
Great questions! #1: the answer is either no or yes but with a different set of patches. The purpose of the patches is to intercept destructive operations and clean up references that would otherwise create memory leaks. If jquery is used only by some unrelated code that never interacts with the DOM that angular is in charge of then we don't need to patch it. Otherwise we need to patch it but instead of cleaning up jquery storage we need to find the corresponding jqlite data storage records for the DOM being destroyed and destroy the references in jqlite. I haven't thought about this enough but I'd skip the patching for now. The patch might not be compatible with the jquery version being used and it might be surprising to get jquery patched and possibly broken just because you loaded it on a page with angular. #2: yes, that sounds like a good idea. I'm not sure what the api should look like right now, but it should be something on angular namespace. |
@IgorMinar Thanks for the reply 😄 Get it. Then need to rethink about I was thinking about giving |
This is now resolved as of 09ee82d |
See discussion at #556 (comment)
It would be useful to be able to tell angular to always use jqlite (even when jquery is present) or maybe even specify which jquery instance to use (since there can be multiple).
The text was updated successfully, but these errors were encountered: