Handle Events in Angular
Event binding handles user actions like button clicks, mouse movements, keystrokes, etc. The specified component method is called when a DOM event (click, keydown, keyup) occurs at an element.
1. click Event
$event variable provide information about the event that was invoked.
pass the value of an input on the page
2. keyup Event
print the value of an input on pressing Enter
3. keyup.enter pseudo-event.
The event handler will be called only when the user presses Enter.