JSFiddle - React, Tailwind, and code Playground
by ucuncubayram
HTML
<div ng-app="app">
<p class="long-text">Bu uzun bir metin.</p>
<p class="long-text">Bu değil.</p>
</div>
JavaScript
var app = angular.module("app",[]);
app.directive("longText", function(){
return {
restrict: "C",
link: function(scope, element, attribute){
if(element.html().length > 10){
element.css('color', 'red');
}
}
}
});