Lesson 6 / 32
Event Binding
Respond to clicks, key presses and other DOM events by binding them to component methods.
(event)="handler()"
Parentheses bind a DOM event to a method on the component class.
<button (click)="increment()">+1</button>
<p>Count: {{ count }}</p>The $event object
$event gives access to the native event, such as the keyboard key or input value.
<input (keyup.enter)="search($event)">