I have some HTML:
<div class='list-group' >
<a href="javascript:;" ng-attr-id="{{company.policy_number}}" class='list-group-item' ng-repeat="company in companies">{{company.primary_name}}</a>
</div>
Each object looks like:
{
policy_number: 12345,
primary_name: "Policy Name Here"
}
How can I set the id of the link that I create to the policy number of the object?
I have tried both id="{{company.policy_number}} and ng-attr-id={{company.policy_number}}, is there something that I am missing here where I can not access this?
Thanks!
id={{company.policy_number}}should work, are you getting an error or is the id field empty?id={company.policy_number}. If I make itid={company.policy_number},though, it is blank.