I have a problem in the Repeat collection. Here is my controller code:
.controller('RescheduleCtrl', function($scope){
this.photos = [];
for (var i = 0; i < 100; i++) {
var w = 100 + Math.floor(Math.random() * 200);
w -= w % 5;
var h = 150 + Math.floor(Math.random() * 100);
h -= h % 5;
this.photos.push({
width: w,
height: h,
src: "1995"
});
}
})
This is the code as a file:
<ion-scroll direction="x" class="available-scroller">
<div class="photo" collection-repeat="photo in photos"
item-height="250" item-width="photo.width + 30">
{{photo.src}}
</div>
</ion-scroll>
I got an error: reassembling the expected attribute collection-item-width will be an expression that returns a number (in pixels) or a percentage.
user4840934
source
share