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

Block Helper and Em.Select context #434

Closed
fsmanuel opened this issue Feb 13, 2013 · 1 comment
Closed

Block Helper and Em.Select context #434

fsmanuel opened this issue Feb 13, 2013 · 1 comment

Comments

@fsmanuel
Copy link

I'm not sure if this is a handlebars bug or a ember bug or nothing of that and i just get it wrong.

I'm using the each helper and inside of it i have a Em.Select with a contentBinding on "controllers.exchanges.optionsForSelect" (using needs: ['exchanges'] in the controller).
Outside of the each helper that works. Inside i changed the binding to "../controllers.exchanges.optionsForSelect" to access the parent context. Now i get an error:
Uncaught TypeError: Cannot read property '0' of null in

function firstKey(path) {
  return path.match(FIRST_KEY)[0];
}

Why isn't that working? How can I bind a Em.Select to the parent context?
I appreciate any suggestions (helpers, etc). I have no idea how i should solve this.
I read #196 but it seems that it doesn't apply to ember bindings.

JsFiddle: http://jsfiddle.net/vZRh2/

@wagenet
Copy link
Collaborator

wagenet commented Feb 13, 2013

@fsmanuel Using the controller keyword works: http://jsfiddle.net/vZRh2/1/. If you're still having issues, you should probably refile on Ember.

@wagenet wagenet closed this as completed Feb 13, 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