Directive code
mymodule.directive('eicon', function(){
return {
restrict: 'E',
scope: {
attr: '='
},
template: "test " + attr.name
}
});
Html
<tr ng-repeat="e in entities">
<td><eicon attr="e"></eicon></td>
</tr>
I've this error: ReferenceError: attr is not defined
. What's wrong?