JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="app">
  <div ng-controller="ctrl">
  <testdirective on-click="testFunction"></testdirective>
  </div>
</div>

JavaScript

angular.module('app',[]).
controller('ctrl', function($scope){
	$scope.testFunction = function(){alert('testFunction');}
})
.directive('testdirective', function(){
    return{
        restrict: 'E',
        scope: {
            onClick: '='
        },
        template: '<div><button ng-click="onClick()">What UP</button></div>',
        replace: true
    }
});