Edit in JSFiddle

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');
            }
        }
    }
});
<div ng-app="app">
    <p class="long-text">Bu uzun bir metin.</p>
    <p class="long-text">Bu de─čil.</p>
</div>