Open nirus opened 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'])
//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.
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.