JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app='myApp' ng-controller='DirectiveTestController'>
    <button hello ng-click="testClick()">Test CLICK!</button>
</div>

JavaScript

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


myApp.controller('DirectiveTestController', ['$scope',

function ($scope) {

    $scope.testClick = function () {
        window.alert("hey");
        console.log("hey");
    }
}]);

myApp.directive('hello', function () {
    return {
        scope: true,
        template: '<div>Directive TEXT </div>',
        link: function (scope, element) {
            element.removeAttr('hello');
        }

    };
});