JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myApp">
<div choice test="4">
<button ng-click="click()">choice 1</button>
</div>
</div>
JavaScript
angular.module('myApp', []).directive('choice', ChoiceDirective);
function ChoiceDirective() {
return {
restrict: 'AE',
scope: {
test: "="
},
link: function(scope, element, attrs) {
//this is firing!
scope.click = function(){
alert('click')
}
}
};
};