Walker
Walker

Reputation: 37

Ionic collection-repeat issue

I used collection-repeat with md-grid-tile below,

    <md-grid-tile collection-repeat="record in records" md-rowspan="1"
 md-colspan="1" md-colspan-sm="1" >
<!--- Rest of code --->
</md-grid-tile>

but when I run this, it will display error like this in console.

Error: collection-repeat tried to compute the height of repeated elements "record in records", but was unable to. Please provide the "item-height" attribute

Is there any way to fix this issue??

Upvotes: 0

Views: 3140

Answers (1)

Karan Kumar
Karan Kumar

Reputation: 2665

collection-repeat works on item-height and item-width. When these are not provided, it assumes that all the elements in collection will have same height as the first element. When ionic is not able to calculate that, it looks for item-height attribute in your collection repeat element.

Upvotes: 2

Related Questions