Open josetaira opened 8 years ago
@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.
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.
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.
Fix issue where $ is not initialized properly. Assuming it must always be initialized to angular.element.