JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="dr" ng-controller="testCtrl">
{{chat.words}}
<test word="word" ng-repeat="word in chat.words"></test>
</div>
JavaScript
var app = angular.module('dr', []);
app.controller("testCtrl", function($scope) {
$scope.chat= {words: [
'Anencephalous', 'Borborygm', 'Collywobbles'
]};
});
app.directive('test', function() {
return {
restrict: 'EA',
scope: {
word: '='
},
template: "<li>{{word}}</li>",
replace: true,
link: function(scope, elm, attrs) {
}
}
});