JSFiddle - React, Tailwind, and code Playground
HTML
<body ng-app="animateApp">
<div ng-controller="tst">
<h7>TEST</h7>
</div>
</body>
JavaScript
var animateAppModule = angular.module('animateApp', [])
animateAppModule.controller('tst',function($scope){
$scope.istrue = false;
})
animateAppModule.directive('h7', function($compile){
return {
restrict:"E",
template:"<div>TEST</div>",
replace:true,
compile:function(tElement, tAttrs, transclude){
tElement[0].setAttribute("ng-class", "{selected:istrue}");
return function(scope, iElement, iAttrs){
$compile(iElement)(scope);
}
}
}
})