Event Listening and Updates in Angular
Learn to import type definitions for micro-event-bus, listen to domain events, and update the screen in our Angular application.
We'll cover the following
The only remaining thing to do in our Angular application is to listen to any domain events that are raised from our Vue front-end. Again, we will need to use the
declaration files for our micro-event-bus
library by importing them through npm
as
follows:
npm link micro-event-bus
Here, we are importing the type definitions for our micro-event-bus
library into our Angular application. We can now listen to events by updating our angular-app/src/app/app.component.ts
file as follows:
Get hands-on with 1200+ tech skills courses.