antonmedv/monkberry

Support for arrow functions in directives?

benjamminf opened this issue · 2 comments

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>

This is cool feature. Already in TODO.

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