Skip to content
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

fix: update initialization of $ correctly #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josetaira
Copy link
Collaborator

@josetaira josetaira commented Apr 22, 2016

Fix issue where $ is not initialized properly. Assuming it must always be initialized to angular.element.

@josetaira
Copy link
Collaborator Author

@Templarian if you can quickly take a look at this. The assumption is that $ should be initialized to angular.element. Instead of initializing it later, we pass it as a parameter in the anonymous function call. I also wrapped everything around a function call so that it'd be easier to uglify and concatenate with.

@Templarian
Copy link
Owner

I did that to keep from wrapping the entire module. You could probably do this with a simple provider...

.value('AngularElement', angular.element) then just inject it ['AngularElement', $]. Didn't test this idea, but I think it should work?

https://github.com/angular-ui/bootstrap/tree/master/src Was looking through to see how they do it here... but they just use angular.element everywhere.

@josetaira
Copy link
Collaborator Author

It might be better to just use angular.element everything. But I prefer to keep the anonymous function call to ensure that projects that merge this code with other codes will work as expected when concatenated and/or uglified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants