Put in order · Angular course · Module 2: Components

Event Binding Syntax (click)

Arrange the single-line tokens to bind the onAttack() method to a button click:

Items to put in order

  • (click)
  • =
  • "onAttack()">
  • <button
Show the answer

Correct order:

  1. <button
  2. (click)
  3. =
  4. "onAttack()">