JSFiddle - React, Tailwind, and code Playground

by jonathanwest

HTML

<div ng-controller="MyCtrl">
    <div class="one"></div>
    <div class="two"></div>
    
    <div class="{{inner}}"></div>
    
    Value of scope.inner = {{inner}}
</div>

JavaScript

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

myApp.directive('one', function() {
    return {
        restrict: 'C',
        template: '<div>Directive one</div>'
    }
});

myApp.directive('two', function() {
    return {
        restrict: 'C',
        template: '<div>Directive two</div>'
    }
});

function MyCtrl($scope) {
    $scope.inner = "one";
}