Created
July 20, 2016 10:06
-
-
Save ronapelbaum/3d386c0df3d1beb70f34d633c8b5150c to your computer and use it in GitHub Desktop.
test angular directives dom events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('utils', []).directive('hover', function() { | |
| return { | |
| restrict: 'E', | |
| template: '<div ng-mouseover="ctrl.over()">HOVER</div>', | |
| controllerAs: 'ctrl', | |
| controller: function() { | |
| this.over = function() { | |
| console.log('over'); | |
| }; | |
| } | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment