<div ng-controller="ctrl"> <mydirc></mydirc> <button ng-click="clickMe()">call clickMe()</button> </div> app.directive('mydirc',function() { return { restrict: 'E',replace: true,template: '<div></div>',link: function($scope,element,attrs) { $scope.clickMe= function() { alert('inside click'); } } } });