AngularJS provides following flags to handle errors and validating the input.
$dirty − indicates that value has is changed.
$invalid − indicates that value is invalid.
$error − gives the specific error.
//$scope.click =1; $scope.tname = 'ravi'; $scope.email = 'ravi@yahoo.com'; } );
[/html]
Apart form events AngularJS provides number of events that can be associated to the input/html controls.
AngularJS provides event directives. There are some common events provided by AngularJS to be used in HTML.
ng-mousedown – (onmousedown in javascript)
ng-mouseenter – (mouseenter in javascript)
ng-mouseleave – (mouseleave in javascript)
ng-mousemove – (mousemove in javascript)
ng-mouseover – (mouseover in javascript)
ng-mouseup – (mouseup in javascript)
ng-blur – (blur in javascript)
ng-change – (change in javascript)
ng-click – (click in javascript)
ng-copy – (oncopy in javascript)
ng-cut – (oncut in javascript)
ng-dblclick – (ondblclick in javascript)
ng-focus – (onfocus in javascript)
ng-keydown – (onkeydown in javascript)
ng-keypress – (onkeypress in javascript)
ng-keyup – (onkeyup in javascript)
ng-paste – (onpaste in javascript)
Total click: {{ click }}
[/html]
We can also call a function using ng-click.
Total click: {{ click }}
//$scope.click =1; $scope.clickFunction = function(){
$scope.click = $scope.click * 2; } } );
[/html]
A Noun is the name of a person, place or thing. or Name of anything is noun. For example: Sita…
Misko Hevery, a Google employee, developed AngularJS. First version 1.0 of AngularJS was released in 2012. Now AngularJS is fully…
AngularJS expressions contain operators,literals, and variables. AngularJS expressions can be written inside HTML while JavaScript expressions can't be. AngularJS expressions…
Some sentences are given below. Choose the nouns and mention the type of noun whether they are proper noun, common…
Modules are containers for appication controller. They contain different parts of an application. [html] {{ state + " " +…
Using Directives you can extend HTML attributes. In AngularJS you can define your own directives while it has its own…