ng-mouseenter

What is ng-mouseenter:ng-mouseenter used to perform any task on mouse down event..
Description of ng-mouseenter:ng-mouseenter has 0 priority . perform any particulate task on mouse enter..
Syntax of ng-mouseenter:
<div ng-mouseenter="myfun()"></div>
Or

<div ng-mouseenter="msg='This is angularjs example of ng-mouseenter"></div>
How to Use ng-mouseenter/ng-mouseenter Example::
Example1:
<div ng-init="msg='angularjs example'">
    msg1:{{msg}}
    <div ng-mouseenter="msg='This is angularjs example of ng-mouseenter'">
        msg2:{{msg}}
    </div>
</div>
o/p: msg:angularjs example
  //when ng-mouseenter fire
     msg:This is angularjs example of ng-mouseenter
Example2:

<div ng-app="webapp">
        <div ng-controller="angularjsexampleCtlr">
            <div>
                Angularjs Example of ng-mouseenter
                <br />
                <div ng-init="myexpression='Angularjs Example of ng-mouseenter'">
                    Before ng-mouseenter fired : {{myexpression}}
                    <div  ng-mouseenter="myfun()" />
                    After ng-mouseenter 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-mouseenter’;
            }
        });
    </script>

   o/p: Before ng-mouseenter fired: Angularjs Example of ng-mouseenter.
            After ng-mouseenter fired :This is angularjs example of ng-mouseenter.

No comments :

Post a Comment