Is there any way to insert in a directive template an angular variable as a string? for example {{row.name}}, so that angular does not interpret it in the page only in the directive. something like this:
directive template:
<div>
<div ng-transclude ng-repeat="row in data">
</div>
</div>
A use case: I send to the directive from the controller the data array. person.name = "John", person.name = "Mike". For this case my page would look like:
....
<div my-directive>
Name: {{row.name}}
</div>
From another controller i send the data: car.weight = 13, car.weight = 44 For this case my page would look like:
....
<div my-directive>
Weight: {{row.weight}}
</div>
The result would be: Name: Name: or Weight: Weight:
This is because {{row}} is undefined
Is this possible or am I understanding everything wrong and there's another way?