Skip to content

Commit

Permalink
fix(collectionRepeat): use $rootScope when checking if digest is needed
Browse files Browse the repository at this point in the history
Closes #1518
  • Loading branch information
mrwade authored and ajoslin committed Jun 4, 2014
1 parent 538737a commit 74a4612
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/angular/service/collectionRepeatDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 74a4612

Please sign in to comment.