On my AngularJS app, I have a component <address> that use collapse from bootstrap. It was working perfectly until I tried to use a dynamic ID for the content to hide.
It was required since I'm using two <address> in the parent component, to avoid ID conflicts.
HTML sample :
<div ng-class="$ctrl.getAddressAccordionClass()">
<h3 data-toggle="collapse" data-target="#$ctrl.addressId" ng-click="$ctrl.toggleAccordion();">
<span>{{$ctrl.boxTitle}}</span>
</h3>
<div ng-attr-id="$ctrl.addressId" class="panel-collapse collapse in">
<p>some content</p>
</div>
</div>
I saw that I can use ng-attr-id to set a dynamic id. But how can I inject my id into data-target property ?