# Event Binding — Angular

Source: https://www.geekswithgeeks.com/en/angular/ng-event-binding

> React to clicks, input, and other DOM events.

## (event)="handler()"

Parentheses bind a DOM event to a method on the component class.

```html
<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.

```html
<input (keyup.enter)="search($event)">
```
