Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action target for itemController #1846

Closed
rlivsey opened this issue Jan 22, 2013 · 1 comment
Closed

action target for itemController #1846

rlivsey opened this issue Jan 22, 2013 · 1 comment

Comments

@rlivsey
Copy link
Contributor

rlivsey commented Jan 22, 2013

Should an action inside of an each with an itemController make the item controller it's default target?

Currently it seems the only way to target the item controller is to be explicit:

{{#each thing in controller}}
        <button {{action select target=thing}}>select</button>
{{/each}}

Using target=this inside of an {{each controller}} doesn't work, neither does leaving out the target altogether - they all go to the page's controller by default.

Here's a fiddle to illustrate this: http://jsfiddle.net/rlivsey/2NDRK/

@wycats
Copy link
Member

wycats commented Jan 30, 2013

I believe that Tom's commit at ae9d164 was intended to address this by moving the itemController into #each, which is able to control the target in child contexts.

@wycats wycats closed this as completed Jan 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants