diff --git a/js/angular/directive/collectionRepeat.js b/js/angular/directive/collectionRepeat.js index ccf9242326..364c244466 100644 --- a/js/angular/directive/collectionRepeat.js +++ b/js/angular/directive/collectionRepeat.js @@ -500,7 +500,6 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) { this.destroy = function() { render.destroyed = true; - unwatch(); itemsPool.forEach(function(item) { item.scope.$destroy(); diff --git a/test/unit/angular/directive/collectionRepeat.unit.js b/test/unit/angular/directive/collectionRepeat.unit.js index 051431bbc0..c147f60688 100644 --- a/test/unit/angular/directive/collectionRepeat.unit.js +++ b/test/unit/angular/directive/collectionRepeat.unit.js @@ -47,7 +47,7 @@ describe('collectionRepeat', function() { } var element; - inject(function($compile, $rootScope) { + inject(function($compile, $rootScope, $timeout) { repeaterScope = $rootScope.$new(); attrs = attrs || ''; if (!/item-height/.test(attrs)) attrs += ' item-height="25px"'; @@ -61,6 +61,7 @@ describe('collectionRepeat', function() { $compile(element)(repeaterScope); $rootScope.$apply(); content.triggerHandler('scroll.init'); + $timeout.flush(); $rootScope.$apply(); }); return element;