rosslavery / velocity-ui-angular

Velocity UI integration for AngularJS
87 stars 6 forks source link

window.ngVelocity? #3

Open nirus opened 9 years ago

nirus commented 9 years ago

Why is this made global. Is there any specific requirement.

I declared a variable

//Container.ngVelocity = angular.module('velocity.ui', ['ngAnimate']) var ngVelocity = angular.module('velocity.ui', ['ngAnimate'])

and i am using like this

//Container.ngVelocity.animation(className, ['VelocityUtils', function(VelocityUtils) { ngVelocity.animation(className, ['VelocityUtils', function(VelocityUtils) { return VelocityUtils._createAngularAnimation(animationName); }]);

Its working perfect. Global variable is creating a angular module footprint which is polluting global space with no reason. Just suggestion. keep up the good work! thanks for the library its great.