JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.angularjs.org/1.0.0rc6/angular-1.0.0rc6.js"></script>
<div ng-app="app">
<bar></bar>
</div>
JavaScript
var app = angular.module("app", []);
app.directive('bar', function() {
return {
restrict: 'E',
scope: true,
template: "<div>bar bar bar</div>",
controller: BarCtrl
};
});
BarCtrl = function($scope, $attrs, $element) {
console.log('element :: ', $element);
alert('element :: ' + $element);
}