Question · Angular course · Module 2: Components

Event Binding

Which syntax is used to listen for events in Angular?

Answer options

  • [click]="handler()"
  • onclick="handler()"
  • (click)="handler()"
  • @click="handler()"
Show the answer

Correct answer:

  • (click)="handler()"