From 74a4612210e6da9f5ebdf964d5256c4896eff185 Mon Sep 17 00:00:00 2001 From: Kevin Wade Date: Wed, 28 May 2014 22:33:31 -0500 Subject: [PATCH] fix(collectionRepeat): use $rootScope when checking if digest is needed Closes #1518 --- js/angular/service/collectionRepeatDataSource.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/angular/service/collectionRepeatDataSource.js b/js/angular/service/collectionRepeatDataSource.js index 32715fd9d6..8e8c24c35a 100644 --- a/js/angular/service/collectionRepeatDataSource.js +++ b/js/angular/service/collectionRepeatDataSource.js @@ -2,7 +2,8 @@ IonicModule .factory('$collectionDataSource', [ '$cacheFactory', '$parse', -function($cacheFactory, $parse) { + '$rootScope', +function($cacheFactory, $parse, $rootScope) { var nextCacheId = 0; function CollectionRepeatDataSource(options) { var self = this; @@ -119,7 +120,7 @@ function($cacheFactory, $parse) { this.transcludeParent[0].appendChild(item.element[0]); } reconnectScope(item.scope); - !item.scope.$$phase && item.scope.$digest(); + !$rootScope.$$phase && item.scope.$digest(); }, getLength: function() { return this.data && this.data.length || 0;