angularjs - Links on mouse hover event in angular js -
i looking menu (vertical) shows sub menu on mouse hover event. sub menu should come @ right side of selected main menu list.
i came main menu ng repeat following snippets.
<head> <title>links on hover angularjs</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js" type="text/javascript"></script> <script src="app.js" type="text/javascript"></script> <script src="linkscontroller.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="leftlinks.css"> </head> <body> <div id='content' ng-app='leftlinks' ng-controller='linkscontroller'> <ul type='none'> <li ng-repeat="link in links"><a href="#" class="leftlinks">{{link}}</a></li> </ul> </div> </body> </html> app.controller("linkscontroller", function($scope){ $scope.links = ['link1','link2','link3','link4']; });
could please take me forward in using ng-mouseenter , leave events. tia
hope helps
<any ng-mouseenter=""> ... </any> <button ng-mouseenter="count = count + 1" ng-init="count=0"> increment (when mouse enters) </button> count: {{count}}
reference: https://docs.angularjs.org/api/ng/directive/ngmouseenter
Comments
Post a Comment