fix(collectionRepeat): use $rootScope when checking if digest is needed

Closes #1518
This commit is contained in:
Kevin Wade
2014-05-28 22:33:31 -05:00
committed by Andrew Joslin
parent 538737ac89
commit 74a4612210

View File

@@ -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;