JSFiddle - React, Tailwind, and code Playground
by edi9999
HTML
<div ng-app="myApp">
<ul ng-controller="users">
<sf-hello ng-repeat="people in peoples">
</sf-hello>
</ul>
</div>
JavaScript
users=function($scope)
{
$scope.peoples=[{name:'Dan',selected:true}
,{name:"Mary",selected:false}]
}
app=angular.module('myApp',[])
app.directive('sfHello',function() { return {
restrict:'E',
replace:true,
scope:true,
transclude:true,
template:'<li ng-transclude ng-show="people.selected">{{people.name}}</li>',
controller:function($scope)
{
console.log(1)
}
} })