JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js"></script>
<body data-ng-app="app" >
<div data-ng-controller="TestController">
<widget data-test-directive>
{{test}}
</widget>
</div>
</body>
JavaScript
var app = angular.module('app', []);
app.directive('testDirective', function() {
var linkFn = function(scope, element, attrs) {
scope.test="Hello world!";
};
return {
link: linkFn
}
});
app.controller('TestController', function ($scope) {
$scope.test = "";
});