O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing events with Aurelia

We were explaining how to override and catch determined events and methods in the component life cycle, but what if we want to write our own methods and execute them when the user clicks on some button or moves the mouse for one section? We will start to delegate events.

The event delegation concept is a useful concept where the event handler is attached to one single element instead of multiple elements on the DOM. What implies that? Memory efficiency. It drastically reduces the number of event subscriptions by leveraging the bubbling characteristic of most DOM events.

On the other hand, we have the trigger concept. Similar, but not equal. You should use trigger binding when you need to subscribe to events that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required