Cross-component communication using Angular events

We touched upon events in the last chapter when learning about Angular's binding infrastructure. It's time now to look at eventing in more depth. Let's add audio support to 7 Minute Workout.

Tracking exercise progress with audio

For the 7 Minute Workout app, adding sound support is vital. One cannot exercise while constantly staring at the screen. Audio clues helps the user perform the workout effectively as he/she can just follow the audio instructions.

Here is how we are going to support exercise tracking using audio clues:

  • A ticking clock sound tracks progress during the exercise
  • A half-way indicator sounds, indicating that the exercise is halfway through
  • An exercise-completion audio clip plays when ...

Get Angular 2 By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.