collectionRepeat: only digest if available

This commit is contained in:
Andy Joslin
2014-04-29 06:20:57 -06:00
parent a4674180c0
commit 431449f28e
2 changed files with 5 additions and 7 deletions

View File

@@ -198,10 +198,6 @@ function($rootScope, $timeout) {
this.setCurrentIndex(startIndex);
this.lastRenderScrollValue = startPos;
// if (!this.dataSource.scope.$$phase) {
// this.dataSource.scope.$digest();
// }
},
renderItem: function(dataIndex, primaryPos, secondaryPos) {
var item = this.dataSource.getItem(dataIndex);
@@ -211,7 +207,9 @@ function($rootScope, $timeout) {
primaryPos, secondaryPos, secondaryPos
);
this.renderedItems[dataIndex] = item;
item.scope.$digest();
if (!item.scope.$$phase) {
item.scope.$digest();
}
} else {
delete this.renderedItems[dataIndex];
}