Angular: Empty Fiddle

http://angularjs.org/

by user1572526

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>
<div ng-controller="MyCtrl">Hello, {{name}}!
    <my-directive></my-directive>
</div>

JavaScript

var myApp = angular.module('myApp', []);

myApp.directive('myDirective', function () {
    return {
        restrict: 'E',
        template: '<div>Hello superman</div>',
        link: function (scope, element) {
            element.bind('mouseenter', function () {
                alert("fire");
                //scope.setFlowOption(this)
            })

        }
    }
});

//myApp.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.name = 'Superhero';
    $scope.categories = [{
        id: 1,
        title: "Keyboards"
    }, {
        id: 2,
        title: "Monitors"
    }, {
        id: 3,
        title: "Laptops"
    }];
}