JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="MyApp" ng-controller="MyCtrl">
    <ul>
        <li ng-repeat="animal in animals" my-directive>{{animal}}</li>
    </ul>
</div>

JavaScript

angular.module("MyApp", [])
    .directive("myDirective", function () {
        return function(scope, element, attrs) {
            alert(scope.animal + " " + element.length);
        };
    });

function MyCtrl($scope) {
    $scope.animals = ["Dog", "Cat", "Elephant"];
}