JSFiddle - React, Tailwind, and code Playground
HTML
<body ng-app="main">
<box></box>
</body>
JavaScript
angular.module('main', [])
.directive('box', function() {
return {
restrict: 'E',
controller: function() { },
require: '?^box',
link: function(scope, iElement, iAttrs, controller) {
alert('Controller found: ' + (controller !== undefined));
}
};
});