JSFiddle - React, Tailwind, and code Playground
by indatawetrust
HTML
<html ng-app="myApp">
<body ng-controller="angularJs">
<a></a>
</body>
</html>
JavaScript
var app = angular.module('myApp',[]);
app.controller('angularJs',function($scope){
$scope.name = 'ahmet';
});
app.directive('a',function(){
return {
restrict : 'E',
template : '<h1>ahmet</h1>',
controller : function($scope,$element){
alert($scope.name+' controller');
},
link : function(scope,elem,att){
alert(scope.name+' link');
}
};
});