# Collection-repeat inside collection-repeat

**URL:** <https://forum.ionicframework.com/t/collection-repeat-inside-collection-repeat/17973>\
**Category:** ionic-v1\
**Created:** [February 20, 2015, 4:55pm UTC](https://forum.ionicframework.com/t/collection-repeat-inside-collection-repeat/17973 "2015-02-20T16:55:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomo03](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@thomo03](https://forum.ionicframework.com/u/thomo03)\
**Post date:** [February 20, 2015, 4:55pm UTC](https://forum.ionicframework.com/t/collection-repeat-inside-collection-repeat/17973/1 "2015-02-20T16:55:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jackyon](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jackyon/32/69735_2.png) [@jackyon](https://forum.ionicframework.com/u/jackyon)\
**Post date:** [July 27, 2015, 6:55am UTC](https://forum.ionicframework.com/t/collection-repeat-inside-collection-repeat/17973/2 "2015-07-27T06:55:15Z")

</div>

same issue, did you found the solution?

plz advise,

thx.

---

<div class="post-metadata">

**Author:** ![ibaiapellaniz](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ibaiapellaniz/32/90515_2.png) [@ibaiapellaniz](https://forum.ionicframework.com/u/ibaiapellaniz)\
**Post date:** [July 27, 2015, 7:06am UTC](https://forum.ionicframework.com/t/collection-repeat-inside-collection-repeat/17973/3 "2015-07-27T07:06:46Z")

</div>

Multiple collection-repeat in the same view need separate scrolls, when you establish one without a scroll wrapping it takes the ion-content’s scroll, but you need to specify them for more than 1. Also It may crush throwing a “too much recursion” error, but seeing your code I wouldn’t know how to code around that case.
