Share.. Ask.. Learn..
Pages
Home
AngularJs Keywords
AngularJS
AngularJS Question & Answer
Angular 2
About Us
Contact Us
Monday, 2 November 2015
ng-mousemove
What is ng-mousemove:
ng-mousemove used to perform any task on mouse move event..
Description of ng-mousemove:
ng-mousemove has 0 priority . perform any particulate task on mouse move..
Syntax of ng-mousemove:
<
div
ng-mousemove
="myfun()"></
div
>
Or
<
div
ng-mousemove
="msg='This is angularjs example of ng-mousemove"></
div
>
How to Use ng-mousemove/ng-mousemove Example::
Example1:
<
div
ng-init
="msg='angularjs example'">
msg1:
{{
msg
}}
<
div
ng-mousemove
="msg='This is angularjs example of ng-mousemove'">
msg2:
{{
msg
}}
</
div
>
</
div
>
o/p:
msg:angularjs example
//when ng-mousemove fire
msg:This is angularjs example of ng-mousemove
Example2:
<
div
ng-app
="webapp">
<
div
ng-controller
="angularjsexampleCtlr">
<
div
>
Angularjs Example of ng-mousemove
<
br
/>
<
div
ng-init
="myexpression='Angularjs Example of ng-mousemove'">
Before ng-mousemove fired :
{{
myexpression
}}
<
div
ng-mousemove
="myfun()"
/>
After ng-mousemove fired :
{{
myexpression
}}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
script
>
angular.module(
'webapp'
,[]).controller(
'angularjsexampleCtlr'
,
function
($scope, $http) {
$scope.myfun =
function
() {
$scoep.myexpression =
'This is angularjs example of ng-mousemove’
;
}
});
</
script
>
o/p:
Before ng-mousemove fired: Angularjs Example of ng-mousemove.
After ng-mousemove fired :This is angularjs example of ng-mousemove.
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment