JSFiddle - React, Tailwind, and code Playground

by Tome Pejoski

HTML

<div data-ng-app="app">
    <div data-ng-controller="AppController">
        <div data-custom-directive></div>
    </div>
</div>

JavaScript

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

function AppController($scope) {}

app.directive('customDirective', function () {
    return {
        restrict: 'A',
        template: '<span data-ng-style="customStyle">text with custom style</span>',
        link: function (scope, element) {
            scope.customStyle = {
                'color': 'red'
            };
        }
    };
});