Events in ANgularJS
Events in AngularJS
AngularJS has its own HTML events directives. The event directives allow us to run AngularJS functions at certain user events.
A list of some events in AngularJS are:-
- ng-blur
- ng-click
- ng-dblclick
- ng-focus
- ng-keydown
- ng-keypress
- ng-keyup
- ng-mousedown
- ng-mouseenter
- ng-mouseleave
- ng-mousemove
- ng-mouseover
- ng-mouseup
Here, we will only use ng-click event.
ng-click Directive:-
The ng-click directive tells AngularJS what to do when an HTML element is clicked.
Syntax:-
< element ng-click="expression" >< /element >
Further Explanation:-
Value | Description |
---|---|
expression | An expression to execute when an element is clicked. |
Code Explanation
All Tutorials related to AngularJS Tutorials
AngularJS Intro
AngularJS Expressions
AngularJS Modules
AngularJS Directives
ng-model Directive
Data Binding
ng-controller
AngularJS Scope
Filters
Services
Tables in AngularJS
Select Boxes
ng-disabled
ng-show
ng-hide
Events
Radio Buttons
Animations