-2

I'm going through some angular code with the following snippet. What is the part with (change) called? What keywords should I use to Google this? I've also seen (click). What other options are there?

<input type="checkbox" name="annotationtype" (change)="onChange('visualtitle', $event.target.checked)" />
wheeeee
  • 1,046
  • 2
  • 14
  • 33
  • 1
    https://angular.io/guide/template-syntax (I'd also recommend going through a structured tutorial - https://angular.io/tutorial). – jonrsharpe Feb 18 '22 at 09:43
  • https://angular.io/guide/event-binding – ruth Feb 18 '22 at 09:45
  • Does this answer your question? [What is the difference between parentheses, brackets and asterisks in Angular2?](https://stackoverflow.com/questions/35944749/what-is-the-difference-between-parentheses-brackets-and-asterisks-in-angular2) – jonrsharpe Feb 18 '22 at 09:54

1 Answers1

0

They are called event bindings: https://angular.io/guide/event-binding

If you would use vanilla html then the equivalent of (click) would be:

<button onclick="onClick()">Click me</button>

Please see the attached link to the documentation. It explains it much better than I can :)