Chapter 4
A whirlwind tour of Aurelia Features – Part 2
Section 3
Using pub/ Sub for Communication
In this video, we’ll show the pub/sub pattern can be used for communication between loosely coupled components. - Demonstrate how changes in filter and changes in the detail view are communicated to the list of todos using the pub/sub pattern. - Give an introduction to Aurelia’s EventAggregatorplugin that implements the pub/sub pattern. - Add code in detail.js and no-selection.js to wire EventAggregator and publish TodoUpdated and FilterChanged messages. Add code in todo-manager\index.js to subscribe to TodoUpdated and FilterChanged messages and update the Todo list view accordingly.