Skip to content

Commit 74a4612

Browse files
mrwadeajoslin
authored andcommitted
fix(collectionRepeat): use $rootScope when checking if digest is needed
Closes #1518
1 parent 538737a commit 74a4612

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/angular/service/collectionRepeatDataSource.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ IonicModule
22
.factory('$collectionDataSource', [
33
'$cacheFactory',
44
'$parse',
5-
function($cacheFactory, $parse) {
5+
'$rootScope',
6+
function($cacheFactory, $parse, $rootScope) {
67
var nextCacheId = 0;
78
function CollectionRepeatDataSource(options) {
89
var self = this;
@@ -119,7 +120,7 @@ function($cacheFactory, $parse) {
119120
this.transcludeParent[0].appendChild(item.element[0]);
120121
}
121122
reconnectScope(item.scope);
122-
!item.scope.$$phase && item.scope.$digest();
123+
!$rootScope.$$phase && item.scope.$digest();
123124
},
124125
getLength: function() {
125126
return this.data && this.data.length || 0;

0 commit comments

Comments
 (0)