Angular TutorialLesson 19Free preview
Angular Events
This lesson is part of Angular · All levels
Summary
Event binding allows components to respond to user actions such as clicks, hover, and inputs. You write events in parentheses, for example, click="proses()", and then you point them to the method in the component class. The event object can also be continued with the variable $event for further logic.
Key points
- Event binding using parentheses (name Event)
- Handler's heading to the method on the component class
- $event brings the original event object to the handler
- Some common events: click, keyup, change, submit
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.