I have the following code
<div data-ng-repeat="entity in myItems">
<div data-entity-vignette="true">
</div>
</div>
Entity Vignette is defined as an attribute directive here:
.directive('entityVignette', function() {
return {
restrict: 'A',
templateUrl: '../Assets/Scripts/entityVignette.html'
}
});
and entityVignette.html contains
<div>{{ entity.DisplayName }}</div>
My question, is how can code my template so that entityVignette.html does not depend on the variable name entity
That is, to work with my variable of entity, I must use data-ng-repeat="entity in myItems", how could I make it work so that enitityVignette.html doesn't care if it's named entity or for instance item?