Ember.js {{action}} in {{each}}

ember.js

Solution

There's nothing at all wrong with doing that. That's the purpose of the context.

Problem

Say I have the following template ``` {{#each item in controller}} <a {{action "doSomething" item}}>{{item.name}}</a> {{/each}} ``` Now I have the following action defined in the router. ``` doSomething: function(router, event){ event.context.get('name'); } ``` is there anything wrong with accessing the property this way? I'm just asking because I haven't seen this anywhere else.

Original source