Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Should we explicitly load jQuery before Angular? #331

Closed
patrickmcelwee opened this issue Apr 20, 2016 · 3 comments
Closed

Should we explicitly load jQuery before Angular? #331

patrickmcelwee opened this issue Apr 20, 2016 · 3 comments
Labels
Milestone

Comments

@patrickmcelwee
Copy link
Contributor

I just read some forums (see here and here) that say that, when angular is loaded before jQuery, it automatically loads its own jqLite library. This can cause problems.

This wiredep thread indicates that the best solution is to exclude jQuery from wiredep's auto-injection, and just explicitly put it into index.html. Not incidentally, this solution would mesh with the solution I am considering for an issue I ran into in the ml-lodlive-ng library. That issue could be solved by explicitly loading both jQuery and the original ml-lodlive library before wiredep's injection block.

@grtjn
Copy link
Contributor

grtjn commented Apr 20, 2016

We solved it by putting jquery above angular in the bower.json dependencies. That seemed enough for all cases that I saw.. It also only matters in cases where jquery needs to interact with angular elements..

@patrickmcelwee
Copy link
Contributor Author

OK, if we aren't seeing problems, then probably no reason to do this.

@grtjn
Copy link
Contributor

grtjn commented Apr 25, 2016

It wasn't necessary to close it just yet, since the solution is not merged yet. It is included in the dashboard PR though: https://github.com/marklogic/slush-marklogic-node/pull/327/files

@grtjn grtjn added the bug label Apr 25, 2016
@grtjn grtjn added this to the 1.1.0 milestone Apr 25, 2016
@grtjn grtjn closed this as completed Jun 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants