# Collection-repeat and ui-sref - problem?

**URL:** <https://forum.ionicframework.com/t/collection-repeat-and-ui-sref-problem/11679>\
**Category:** ionic-v1\
**Created:** [October 24, 2014, 12:37pm UTC](https://forum.ionicframework.com/t/collection-repeat-and-ui-sref-problem/11679 "2014-10-24T12:37:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitch](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@mitch](https://forum.ionicframework.com/u/mitch)\
**Post date:** [October 24, 2014, 12:37pm UTC](https://forum.ionicframework.com/t/collection-repeat-and-ui-sref-problem/11679/1 "2014-10-24T12:37:33Z")

</div>

Hi,

Anyone notice that collection-repeat don’t play nicely with ui-sref. Using collection-repeat and a ui-sref linkdoesn’t seem to pass $stateParams to the controller.

Tried same link with ng-repeat and it worked like a charm.

```
       <div ng-repeat="item in results " ng-style="{'background-color': item.accentcolor}" ui-sref="modal.view({ id : '{{item.id}}' })">{{item.id}}</div>

```

Does not work:

```
 <div style="left: 0; right: 0;"
     collection-repeat="item in results"
     collection-item-width="320"
     collection-item-height="360" 
     ng-style="{'background-color': item.accentcolor}"
     ui-sref="modal.view({ id : '{{item.id}}' })"
 >

```

In both cases the ‘id’ is visible in the HTML before clicking.

---

<div class="post-metadata">

**Author:** ![razmik](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/razmik/32/105546_2.png) [@razmik](https://forum.ionicframework.com/u/razmik)\
**Post date:** [May 4, 2015, 5:18am UTC](https://forum.ionicframework.com/t/collection-repeat-and-ui-sref-problem/11679/2 "2015-05-04T05:18:55Z")

</div>

Tried with - ui-sref="modal.view({ id : [item.id](http://item.id) })"  
It worked for me.

Follows the complete code.

---

<div class="post-metadata">

**Author:** ![Blackscreen](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@Blackscreen](https://forum.ionicframework.com/u/Blackscreen)\
**Post date:** [January 23, 2016, 8:09pm UTC](https://forum.ionicframework.com/t/collection-repeat-and-ui-sref-problem/11679/3 "2016-01-23T20:09:32Z")

</div>

did you solved it?

greets Bernhard

---

<div class="post-metadata">

**Author:** ![William\_Wallace](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/william_wallace/32/131850_2.png) [@William\_Wallace](https://forum.ionicframework.com/u/William_Wallace)\
**Post date:** [August 17, 2016, 12:58pm UTC](https://forum.ionicframework.com/t/collection-repeat-and-ui-sref-problem/11679/4 "2016-08-17T12:58:40Z")

</div>

> [@mitch](#):
>
> round-color

Same issue here, any infos?
