diff --git a/js/angular/directive/collectionRepeat.js b/js/angular/directive/collectionRepeat.js index 001aa6c4163..bfd0a629dd6 100644 --- a/js/angular/directive/collectionRepeat.js +++ b/js/angular/directive/collectionRepeat.js @@ -228,6 +228,7 @@ function($collectionRepeatManager, $collectionDataSource, $parse) { before = false; } else { if (node.hasAttribute('collection-repeat-ignore')) return; + if (node.nodeName === 'ION-INFINITE-SCROLL')return; var width = node.offsetWidth; var height = node.offsetHeight; if (width && height) { diff --git a/js/angular/service/collectionRepeatManager.js b/js/angular/service/collectionRepeatManager.js index d1b87ae4824..ccb64f77510 100644 --- a/js/angular/service/collectionRepeatManager.js +++ b/js/angular/service/collectionRepeatManager.js @@ -154,6 +154,7 @@ function($rootScope, $timeout) { this.beforeSize = result.beforeSize; this.setCurrentIndex(0); this.render(true); + this.dataSource.transcludeParent[0].style.height = result.totalSize + "px"; this.dataSource.setup(); }, /* diff --git a/test/unit/angular/service/collectionRepeatManager.unit.js b/test/unit/angular/service/collectionRepeatManager.unit.js index 7693d8e4631..d42ffc96d55 100644 --- a/test/unit/angular/service/collectionRepeatManager.unit.js +++ b/test/unit/angular/service/collectionRepeatManager.unit.js @@ -251,7 +251,7 @@ describe('collectionRepeatManager service', function() { it('should work without data', function() { var manager = setup(); spyOn(manager, 'render'); - spyOn(manager, 'calculateDimensions').andReturn({ + spyOn(manager, 'calculateDimensions').andReturn({ dimensions: [], beforeSize: 0, totalSize: 0 @@ -265,7 +265,7 @@ describe('collectionRepeatManager service', function() { }); it('should work with data', function() { var manager = setup(); - spyOn(manager, 'calculateDimensions').andReturn({ + spyOn(manager, 'calculateDimensions').andReturn({ dimensions: [{ primaryPos: 100, primarySize: 30 }], @@ -273,6 +273,7 @@ describe('collectionRepeatManager service', function() { totalSize: 130 }); manager.resize(); + expect(manager.dataSource.transcludeParent[0].style.height).toBe('130px'); expect(manager.viewportSize).toBe(130); }); });