Binder makes it easy to attach event listeners to your elements using @{eventType}={action} syntax, eg. @click="someMethod" where click is the event to listen for and someMethod is a method on your controller class.
Modifiers
There are a couple of modifiers that can be used when setting up event listeners. Modifiers can be mixed and appear in any order.
.prevent
The .prevent modifier will call event.preventDefault() and stop events from triggering their default actions.
.stop
The .stop modifier will call event.stopPropagation() and stop events from bubbling up the DOM.
.eval
The .eval modifier will evaluate the action instead of treating it as a method on the controller, allowing you to use any arbitrary JavaScript expression as your action.
The controller instance will be bound to this allowing you to still access the controller instance and the event object will be available as e.
The .render modifier will call this.render() on the controller after your event code is executed.
If your event handler is async then the render will happen after the promise resolves.
Emiting Events
Controllers can also emit custom events by calling this.emit(eventName, eventData), and listen for events using this.listenFor(target, "event-name", callback) allowing seamless communication between controllers.