Bootstrap Confirmation not working in ng-repeat

I am trying to use Boopstrap confirmation on a button in ng-repeat

When I myself make the button outside the ng-repeat like so

<button type="button"
        class="btn btn-danger"
        ng-click="removeLog(results.id)"
        data-toggle="confirmation_9">Remove button</button>

      

With the appropriate JavaScript code

$("[data-toggle^=confirmation_]").confirmation({
    rootSelector: '[data-toggle=confirmation]',
});

      

Works as expected, but when I do it in ng-repeat

<tr ng-repeat="results in results track by $index">
    <td>
        <button type="button"
                class="btn btn-danger"
                ng-click="removeLog(results.id)"
                data-toggle="confirmation_{{results.id}}">Remove button</button> 
   </td>  
</tr>

      

No confirmation popup is shown for all duplicate data

+3


source to share





All Articles