JSFiddle - React, Tailwind, and code Playground

by Amaury Dalla Monta

HTML

<div ng-app="MyApp">
    <div click-me />
</div>

JavaScript

angular
    .module('MyApp', [])
    .directive(
        'clickMe',
        function () {
            return {
                template : '<div>Click me !</div>',
                replace : true,
                link : function (scope, element) {
                    element.bind('click', function ()
                    {
                        alert('Clicked !');
                    });
                },
            };
        }
    );