@this at `property`


Good day everyone.

I know that I can use @this to access itemController's property, e.g.:

foos: Em.computed.mapBy('@this', 'foo')

How can I access itemController's property in the next example?

foos: function() {}.property('@this.foo') // doesn't work
foos: function() {}.property('@this.@each.foo') // doesn't work too



Assuming you’re working with an Array Controller, change the last line of your example code from:

foos: function() {}.property('@this.@each.foo')


foos: function() {}.property('content.@each.foo')


You would be enumerating over the array controllers model’s here which he doesn’t want to do, he/she wants to enumerate over the item controllers.

foos: function() {}.property('@each.foo')

Example: http://jsfiddle.net/NQKvy/1235/


Cool, thanks.

I’ve tried @each.foo on Ember 1.5, but it didn’t work, that’s why I’ve created this topic.


Ah, good catch; totally missed that.