diff options
| author | Misko Hevery | 2013-04-11 22:39:15 -0700 |
|---|---|---|
| committer | Misko Hevery | 2013-04-11 23:06:07 -0700 |
| commit | 570463a465fae02efc33e5a1fa963437cdc275dd (patch) | |
| tree | fde71c8e537b0c8985ba5d0f920f8fc67ef2585a /test/ng/directive/ngViewSpec.js | |
| parent | 3c3247fe174ce408459bd018c9d83e84490789f5 (diff) | |
| download | angular.js-570463a465fae02efc33e5a1fa963437cdc275dd.tar.bz2 | |
fix(ngAnimate): prevent animation on initial page load
Diffstat (limited to 'test/ng/directive/ngViewSpec.js')
| -rw-r--r-- | test/ng/directive/ngViewSpec.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ng/directive/ngViewSpec.js b/test/ng/directive/ngViewSpec.js index c0348568..e9d53110 100644 --- a/test/ng/directive/ngViewSpec.js +++ b/test/ng/directive/ngViewSpec.js @@ -4,8 +4,9 @@ describe('ngView', function() { var element; beforeEach(module(function() { - return function($rootScope, $compile) { + return function($rootScope, $compile, $animator) { element = $compile('<ng:view onload="load()"></ng:view>')($rootScope); + $animator.enabled(true); }; })); @@ -510,8 +511,9 @@ describe('ngAnimate', function() { beforeEach(module(function($provide, $routeProvider) { $provide.value('$window', window = angular.mock.createMockWindow()); $routeProvider.when('/foo', {controller: noop, templateUrl: '/foo.html'}); - return function($templateCache) { + return function($templateCache, $animator) { $templateCache.put('/foo.html', [200, '<div>data</div>', {}]); + $animator.enabled(true); } })); @@ -579,8 +581,8 @@ describe('ngAnimate', function() { element = $compile(html( '<div ' + 'ng-view ' + - 'ng-animate="{enter: \'customEnter\', animateFirst: false}">' + - '</div>' + 'ng-animate="{enter: \'customEnter\'}">' + + '</div>' ))($rootScope); $location.path('/foo'); |
