JSFiddle - React, Tailwind, and code Playground

by Yang Tyler

HTML

<div ng-app="app" ng-controller="sample">
    
    <my-button>{{ text }}</my-button>
    
</div>

JavaScript

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

app.controller('sample', function ($scope) {
    $scope.text = "My Awesome Button Text";
});

app.directive('myButton', function () {
    
    return {
        restrict: 'E',
        template: '<button ng-transclude></button>',
        transclude: true
    }
    
});