JSFiddle - React, Tailwind, and code Playground

by Michele Marcucci

HTML

<div ng-app="myApp">
    <my-directive color='purple'>
    </my-directive>
</div>

JavaScript

angular.module('myApp', [])
.directive('myDirective', function () {
    return {
        restrict: 'E',
        scope: {
            localVar: '@color'
        },
        template: '<span> {{ localVar }} </span>'
    };
});