JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="myApp">
    <span confirmable ng-click="doSomething()"></span>
</div>

JavaScript

angular.module('myApp', [])
    .run(function($rootScope) {
        $rootScope.doSomething = function() {
            alert('hi');
        };
    })
    .directive('confirmable', function() {
        return {
            template: '<button>confirmable</button>',
            replace: true
        };
    });