fix(collectionRepeat): rerender when $ionicScrollDelegate resizes

Fixes #1777
This commit is contained in:
Andrew
2014-08-11 10:23:49 -04:00
parent 9a1f3d7e26
commit 5e025fbb01
3 changed files with 18 additions and 4 deletions

View File

@@ -152,6 +152,16 @@ describe('collectionRepeat directive', function() {
expect(scrollView.resize.callCount).toBe(1);
});
it('should rerender on scrollCtrl resize', inject(function($timeout) {
var el = setup('collection-repeat="item in items" collection-item-height="50"');
var scrollCtrl = el.controller('$ionicScroll');
repeatManager.resize.reset();
scrollCtrl.resize();
$timeout.flush();
expect(repeatManager.resize.callCount).toBe(1);
}));
it('$destroy', function() {
var el = setup('collection-repeat="item in items" collection-item-height="50"');
dataSource.destroy = jasmine.createSpy('dataSourceDestroy');