monkberry
monkberry copied to clipboard
Support for arrow functions in directives?
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 :+1: