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

Support for arrow functions in directives? #16

Open
benjamminf opened this issue Jul 8, 2016 · 2 comments
Open

Support for arrow functions in directives? #16

benjamminf opened this issue Jul 8, 2016 · 2 comments
Labels

Comments

@benjamminf
Copy link

Currently calling a method in a directive requires having to re-bind the context, which is a little redundant.

<button :onclick={{ this.method.bind(this) }}>Run method</button>

It'd be nice if it could support arrow functions, and allow for accessing arguments too (like an event object):

<button :onclick={{ e => this.method(e) }}>Run method</button>
@antonmedv
Copy link
Owner

antonmedv commented Jul 8, 2016

This is cool feature. Already in TODO.

@benjamminf
Copy link
Author

Ah my bad, didn't see the TODO list. Looking forward to it 👍

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

No branches or pull requests

2 participants