I have an AngularJS module:
angular.module("app", ['ui.bootstrap', 'ngRoute', 'ngGridPanel']).config(function($routeProvider) {
As you can see it has ngGridPanel included via dependency injection.
Here is the definition of ngGridPanel's module/directive:
angular.module('ngGridPanel', ['ngAnimate']).directive('gridPanel', ['$animate', '$compile', '$window', '$document', '$timeout', function ($animate, $compile, $window, $document, $timeout) {
As you can see, it refers to ngAnimate.
The problem I am having is that once I inject ngGridPanel into my app, every element in my app is suddenly attempting to be animated.
Now, as described in this Angular.js GitHub issue, ngAnimate will assume everything should be animated. Once I realized this is the expected behaviour, I realized that I never included ngAnimate into my app module in the first place.
So why would it be affecting my entire application? Shouldn't it only take effect in the directive that belongs to the ngGridPanel module?
So how is ngAnimate affecting the parent module scope? Is this normal?
Side-note: At this point I haven't even utilized the ngGridPanel directive at all. I have merely injected it into my app.
Side-note 2: Once I implemented a class name filter ($animateProvider.classNameFilter(/enable-animate/);) in my app, animations stopped on all my elements but remained working in the ngGridPanel directive without having to add the enable-animate class anywhere.