Angular EventEmitter and Services
Learn how to use the Angular EventEmitter and Angular services to manage events in TypeScript.
We'll cover the following
Angular EventEmitter
When a user clicks on the “login” button of our toolbar, we will need to show the login panel, which will allow the user to enter their username and password.
The event handler that traps the click event on the “login” button, however, is a part of the user-details component that renders the buttons onto the screen. Angular provides an EventEmitter
class,
which allows child components to send messages to their parents.
Let’s explore this mechanism by modifying our UserDetailsComponent
class as follows:
Get hands-on with 1400+ tech skills courses.