JSFiddle - React, Tailwind, and code Playground

by Minko Gechev

HTML

<div ng-app="app" ng-controller="MainCtrl">
    <input type="text" ng-model="value" />
    <dir var-name="value"/>
</div>

JavaScript

window.app = angular.module('app', [])
.filter('Filter', function () {

})
.controller('MainCtrl', function ($scope) {
    $scope.value = "Variable";
})
.directive('dir', function () {
    return {
        restrict: 'E',
        scope: {
            value: '=varName'
        },
        template: '<div ng-bind="value"></div>'
    };
});