JSFiddle - React, Tailwind, and code Playground
by Ashesh Ambasta
HTML
<body>
<div ng-app="myapp" ng-controller="MyCtrl">
<bill-info></bill-info>
</div>
</body>
JavaScript
var app = angular.module('myapp', []);
app.directive("billInfo", function(){
console.log('ran');
return {
replace: true,
template: '<div><div draggable>Hello {{msg}}</div></div>',
link: function (scope, element, attrs) {
scope.msg = "world!";
}
}
});
app.directive('draggable', function(){
return {
restrict: 'A',
replace: true,
link: function () {
// do something here
}
}
});
function MyCtrl($scope){
}