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

can-EVENT arguments #1219

Closed
justinbmeyer opened this issue Aug 26, 2014 · 6 comments · Fixed by #1495
Closed

can-EVENT arguments #1219

justinbmeyer opened this issue Aug 26, 2014 · 6 comments · Fixed by #1495
Milestone

Comments

@justinbmeyer
Copy link
Contributor

VOTE HERE

It should be possible to pass can-EVENT bindings arguments from the scope like:

<li can-click="{doSomething key1 ../key2 "foo" @element @event}">

Pull request from @zkat : #1357

@justinbmeyer justinbmeyer added this to the 2.2.0 milestone Aug 26, 2014
@cherifGsoul
Copy link
Member

this could be implemented with helplers?

@justinbmeyer
Copy link
Contributor Author

I'm not sure what you mean.

@justinbmeyer
Copy link
Contributor Author

It should make use of the same mustache-helper parsing logic. But that logic needs to be made more easily available to view bindings.

@wclr
Copy link
Contributor

wclr commented Aug 28, 2014

Yes that would VERY useful, currently one have to change context of the element to pass particular data to event handler.

@cherifGsoul
Copy link
Member

@justinbmeyer Can you give more details on this?
I dont understand how to pass arguments?
key 1 key2 represent what? does the can-EVENT view/binding will be affected or remain the same and add this as a plugin?

@justinbmeyer
Copy link
Contributor Author

can-EVENT will be the same if you don't specify arguments.

key1 and key2 represent a key in the scope. http://canjs.com/docs/can.mustache.key.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants