Angular · Junior · Question 11 of 75

How do you handle a button click?

Explanation

Parentheses are event binding. The $event variable gives access to the DOM event: (input)="onInput($event)". Square brackets are for property binding, not events.

Further reading

Problem with a question

Angular · Junior · question 11

Test yourself

Take the Angular · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz