# Collection-repeat item not working with angular component

**URL:** <https://forum.ionicframework.com/t/collection-repeat-item-not-working-with-angular-component/62173>\
**Category:** ionic-v1\
**Created:** [August 31, 2016, 1:27pm UTC](https://forum.ionicframework.com/t/collection-repeat-item-not-working-with-angular-component/62173 "2016-08-31T13:27:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MisterDev](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@MisterDev](https://forum.ionicframework.com/u/MisterDev)\
**Post date:** [August 31, 2016, 1:27pm UTC](https://forum.ionicframework.com/t/collection-repeat-item-not-working-with-angular-component/62173/1 "2016-08-31T13:27:12Z")

</div>

I’m trying to use `collection-repeat` to display an angular component for each object in an array. I pass each object as parameter to an angular component but when I try to access the object in my component’s controller I get `undefined`.

```
<ion-content>
   <ion-list>
     <ion-item
   	collection-repeat="user in users"
   	item-width="100%"
  	item-height="90px">
        {{user}} //renders my user data correctly instantly
	<usser user="user"></user>
    </ion-item>
  </ion-list>
</ion-content>

```

My component

```
angular
    .module('app')
    .component('user', {
    	templateUrl: 'components/user.html',
        scope: true,
    	bindings: {
    	    user: '<'
    	},
    	controller: function() {
	    console.log(self.user) //prints undefined
    	}
    })

```

- I’ve tried wrapping the `console.log` in a `$timeout` without success
- Printing `self` displays `{user: undefined}` in my chrome console, but if I expand the object I can see that user contains the correct data (only for the some of the items)
- Accessing `self.user` doesn’t work

**EDIT:** I can’t really understand what’s going on…

```
controller: function() {
    console.log(self.user) //prints undefined
    setTimeout(function() {
        console.log(self.user) // prints my data
    }, 2000)
}

```

What am I doing wrong?

Thanks in advance! 🙂 (😭 😡)
