TutorialLesson 17Free preview
AngularJS Events
This lesson is part of AngularJS · All levels
Summary
AngularJS events are written as attributes such as ng-click, ng-dblclick, ng-mouseover, and ng-submit. Each handler executes an expression against the scope, for example adding value or calling a controller function. Because it's in the context of AngularJS, the resulting changes automatically enter the digest cycle.
Key points
- Ng-click is the most common way to handle button clicks
- The handler contains an expression evaluated on the scope
- Other events: ng-dblclick, ng-mouseenter, ng-keydown, ng-submit
- Execution from inside the handler triggers automatic digestion
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.