1.

Explain Event Binding with an appropriate example.

Answer»

Event BINDING is a technique that is USED in Angular 8 to handle the events RAISED from the Document Object Model (DOM), for instance, BUTTON clicks, mouse hovers, mouse moves, etc. When the DOM event happens, the specified method in the component is immediately called.

An example of event binding is given below -

<button (click)="raiseVolume()"></button>

 In this example, the raiseVolume() method from the component will be called when the button is clicked.



Discussion

No Comment Found