I have the following code snippet.
Now, I am trying to pass a dynamic AngularJS variable, specifically the id of a repeating list.
The button in question is used for deactivation purposes, and upon clicking it, a confirmation box pops up. Upon confirming by clicking the appropriate button, a specific function should run with the passed id.
However, there seems to be an issue with sending the id along with the attributes data-target and data-toggle.
Within the code, I want to send {{key.id}} to the confirmation box.
<tr data-ng-repeat="key in services">
<td>{{key.service}}</td>
<td class="text-center">
<button type="button" data-person="Zim" class="btn btn-warning btn-xs" data-toggle="modal" data-target="#Deactivate">Deactivate</button>
</td>
</tr>
<!-- Modal Deactivate Starts-->
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Confirm Box</h4>
</div>
<div class="modal-body">
<p>Do you want to Deactivate (servicename) service? </p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-ng-click="deactivate(1)" data-dismiss="modal">Deactivate</button>
</div>
</div>
</div>
Any assistance would be greatly appreciated!