# Event Binding — Angular Fundamentals: Components, Signals and Routing

Source: https://www.skillbyai.com/en/angular/ng-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.

```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)">
```
