HTML elements have various DOM events that will be fired when an event is triggered. For example, a button will fire a click event when it is clicked on. We hook an event listener to get notified whenever an event is fired:
<button (click)="doSomething()">Do Something</button>
The preceding Angular code snippet that wraps the event name in brackets needs to hook the event listener so that it gets called when a click event is fired.