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

publish(event, data)

This method allows you to fire events. Remember that our EventAggregator will be placed in some parent component, so you know which components will be subscribed to it. So, because of that, this method does not have a specific target; they are just events triggered to space and doesn't matter if they have zero or more subscribers.

The first argument is the event name. You can choose any name for this, as it is your custom event. It will be used as an identifier to call it from external components across our application. In this case, you can use EventAggregator to configure our loading bar, so it would be right to name our event according to it. We will call it dataRetrievingEvent.

The second argument is the data you ...

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