mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(collectionRepeat): use $rootScope when checking if digest is needed
Closes #1518
This commit is contained in:
committed by
Andrew Joslin
parent
538737ac89
commit
74a4612210
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user