i have angularjs module:
angular.module("app", ['ui.bootstrap', 'ngroute', 'nggridpanel']).config(function($routeprovider) { as can see has nggridpanel included via dependency injection.
here definition of nggridpanel's module/directive:
angular.module('nggridpanel', ['nganimate']).directive('gridpanel', ['$animate', '$compile', '$window', '$document', '$timeout', function ($animate, $compile, $window, $document, $timeout) { as can see, refers nganimate.
the problem having once inject nggridpanel app, every element in app attempting animated.
now, described in angular.js github issue, nganimate assume should animated. once realized expected behaviour, realized i never included nganimate app module in first place.
so why affecting entire application? shouldn't take effect in directive belongs nggridpanel module?
so how nganimate affecting parent module scope? normal?
side-note: @ point haven't utilized nggridpanel directive @ all. have merely injected app.
side-note 2: once implemented class name filter ($animateprovider.classnamefilter(/enable-animate/);) in app, animations stopped on elements remained working in nggridpanel directive without having add enable-animate class anywhere.
if depend on nggridpanel , nggridpanel depends on nganimate, depend on nganimate well.
it exact same if had defined app angular.module("app", ['ui.bootstrap', 'ngroute', 'nggridpanel', 'nganimate']) .
as side-note 2, seems have configured use .classnamefilter() animations wouldn't break if user of library decided configure differently, such did. don't know nganimate that's hunch.
Comments
Post a Comment