Hello. I’m trying to create a list of items. I previously did this with ng-repeat and noticed the application was crashing.
I’ve started using collection-repeat. it all seemed to be working fine here
<ion-content class="has-header">
<ion-refresher pulling-text="" on-refresh="doRefresh()"></ion-refresher>
<div class=""
collection-repeat="item in items"
collection-item-width="'100%'"
collection-item-height="'100%'">
<div class="list card">
<img ng-click="goToItemDetails(item, $index)" class="full-image" ng-src="{{item.image.Url}}">
</div>
</div>
<div ng-hide="items">nothing</div>
<ion-infinite-scroll on-infinite="loadMore()" ng-if="!moredata" distance="1%"></ion-infinite-scroll>
<!--ng-if="noMoreItemsAvailable"-->
</ion-content>
The problem is as soon as I add another collection-repeat inside the existing collection-repeat like this:
<ion-content class="has-header">
<ion-refresher pulling-text="" on-refresh="doRefresh()"></ion-refresher>
<div class=""
collection-repeat="item in items"
collection-item-width="'100%'"
collection-item-height="'100%'">
<div class="list card">
<img ng-click="goToItemDetails(item, $index)" class="full-image" ng-src="{{item.image.Url}}">
</div>
<div class=""
collection-repeat="comment in item.comments"
collection-item-width="'100%'"
collection-item-height="'100%'">
</div>
</div>
<div ng-hide="items">nothing</div>
<ion-infinite-scroll on-infinite="loadMore()" ng-if="!moredata" distance="1%"></ion-infinite-scroll>
<!--ng-if="noMoreItemsAvailable"-->
</ion-content>
I receive the following message: Error: [$compile:ctreq] Controller ‘$ionicScroll’, required by directive ‘collectionRepeat’, can’t be found!
I used to use ng-repeat inside of other ng-repeats. Is there something I’m missing here?
Many thanks