diff --git a/js/angular/directive/collectionRepeat.js b/js/angular/directive/collectionRepeat.js index 364c244466..8133a90075 100644 --- a/js/angular/directive/collectionRepeat.js +++ b/js/angular/directive/collectionRepeat.js @@ -223,13 +223,13 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r "but got a " + typeof value); } - if (newValue.length) { - // Wait for this digest to end before refreshing everything. - $timeout(function() { - getRepeatManager().refreshData(newValue); + // Wait for this digest to end before refreshing everything. + $timeout(function() { + if (newValue.length) { refreshDimensions(); - }, 0, false); - } + } + getRepeatManager().refreshData(newValue); + }, 0, false); }); // Make sure this resize actually changed the size of the screen @@ -579,7 +579,7 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) { if (item.secondarySize !== dim.secondarySize || item.primarySize !== dim.primarySize) { item.node.style.cssText = item.node.style.cssText .replace(WIDTH_HEIGHT_REGEX, WIDTH_HEIGHT_TEMPLATE_STR - .replace(PRIMARY, 1 + (item.primarySize = dim.primarySize)) + .replace(PRIMARY, (item.primarySize = dim.primarySize) + 1) .replace(SECONDARY, (item.secondarySize = dim.secondarySize)) ); }