JSFiddle - React, Tailwind, and code Playground

by zequez

HTML

<div class="container" ng-app="App">
    <div class="item" n-repeat="item in ['broccoli', 'beans', 'potato', 'banana']" foo>{{item}}</div>
</div>

JavaScript

angular.module('App', [])
.directive('foo', function() {
    return {
        multiElement: true,
        replace: true,
        template: '<div>Hey</div>',
        link: function(scope, element, attrs) {
            console.log('Insert tag!', scope.item);
            if (scope.$last) {
                console.log('Initialize DTM!');
            }
        }
    };
});