How to handle Events in Angular 5?
Answer / Gyanendra Singh
In Angular 5, events are handled using the EventEmitter and OnInit interfaces. To create a custom event, you can extend the EventEmitter class, and then trigger it with the emit() method. To listen to an event, use the @Output decorator in the component where you want to handle the event.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is dependency injection (di)? Why use?
How to enable and disable buttons with using condition?
When to use $destroy() function of scope?
What is the use of angular 7?
Whats is a filter?
What is a template in angular?
What is the difference between an observable and a promise?
Difference between service, directive, and module?
Can we use angularjs in android?
What makes angular.js better?
How would you use a route guard?
In what ways can you use a directive?