# How do I set a property on an itemController?

**URL:** https://discuss.emberjs.com/t/how-do-i-set-a-property-on-an-itemcontroller/5672
**Category:** Uncategorized
**Created:** [June 17, 2014, 3:30am UTC](https://discuss.emberjs.com/t/how-do-i-set-a-property-on-an-itemcontroller/5672 "2014-06-17T03:30:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bkparso](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bkparso/32/14842_2.png) [@bkparso](https://discuss.emberjs.com/u/bkparso)
#### Post date: [June 17, 2014, 3:30am UTC](https://discuss.emberjs.com/t/how-do-i-set-a-property-on-an-itemcontroller/5672/1 "2014-06-17T03:30:26Z")

</div>

I have an `ArrayController` that uses associated `itemControllers` to track a `checked` property on the set of models (i.e. whether or not their checkbox is checked).

This part is currently working fine. When I come back to the route, I need to use some information off of the `user` model to “remember” which were checked.

How can I set the `checked` property on the specific `itemController`’s? I can get references to the individual models that need “checking”, but `model.set('checked', true)` doesn’t seem to get picked up by the `itemController` in that scenario.

Any help would be appreciated!

P.S. I’m trying to set this from the route.

---

<div class="post-metadata">

### Author: ![bkparso](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bkparso/32/14842_2.png) [@bkparso](https://discuss.emberjs.com/u/bkparso)
#### Post date: [June 17, 2014, 3:58am UTC](https://discuss.emberjs.com/t/how-do-i-set-a-property-on-an-itemcontroller/5672/2 "2014-06-17T03:58:10Z")

</div>

I’ve figured out a way to do it by accessing the `itemControllers` as `controller.get('_subControllers')`. But I feel like someone is going to tell me I shouldn’t be doing that.

---

<div class="post-metadata">

### Author: ![jasonmit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jasonmit/32/182_2.png) [@jasonmit](https://discuss.emberjs.com/u/jasonmit)
#### Post date: [June 17, 2014, 4:00am UTC](https://discuss.emberjs.com/t/how-do-i-set-a-property-on-an-itemcontroller/5672/3 "2014-06-17T04:00:51Z")

</div>

> [@bkparso](#):
>
> How can I set the checked property on the specific itemController’s

> **[Ember Latest - JSFiddle - Code Playground](https://jsfiddle.net/NQKvy/1043/)**
>
> Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.

> [@bkparso](#):
>
> But I feel like someone is going to tell me I shouldn’t be doing that.

Yeah, that’s wrong. You have access to all your favorite array functions on the ArrayController that will let you filter, enumerate, through the underlying controllers w/o accessing \_subControllers.

---

<div class="post-metadata">

### Author: ![bkparso](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bkparso/32/14842_2.png) [@bkparso](https://discuss.emberjs.com/u/bkparso)
#### Post date: [June 17, 2014, 11:44am UTC](https://discuss.emberjs.com/t/how-do-i-set-a-property-on-an-itemcontroller/5672/4 "2014-06-17T11:44:20Z")

</div>

Thanks @jasonmit! I think the issue was that I was trying to do operations on the _content_, rather than the _controller_. i.e. `controller.get('content').forEach(function().....` rather than `controller.forEach(function.....`
