JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="test" ng-controller="MainCtrl">
<custom ng-repeat="page in pages"></custom>
</div>
JavaScript
angular.module('test', []).controller('MainCtrl', function($scope) {
$scope.pages = [
{width: 100, height: 100},
{width: 200, height: 200}
];
}).directive('custom', function() {
return {
restrict: 'E',
link: function(scope, element, attrs) {
console.log(scope.page);
}
}
});