I have a button directive as follows (Plunker is here):
<button type="button"
data-confirm-popup-btntext="Reject"
data-confirm-popup-text="Do you want to reject"
data-confirm-popup-header="Reject"
data-confirm-popup-click="reject(obj)"
class="btn btn-danger btn-xs"
data-ng-class="{disabled : disable}"
data-ng-if="show"></button>
I have data-confirm-popup-btntext
for button text. Which I do not want. I also do not want data-confirm-popup-click
. Rather I want to use ng-click
.
My concept is, there will be any button on any view. If I need to display a confirm dialog before processing I will add one attribute(directive) to that button and that directive will take care everything.
Also I am not able to add <span class'bootstrap-icon'></span> Reject
in current implementation.
So my desired outcome of the directive is as follows :
<button type="button"
data-confirm-popup-header="Reject"
data-confirm-popup-text="Do you want to reject"
<!--Above line two line will add confirm dialog functionality -->
data-ng-click="reject(obj)"
class="btn btn-danger btn-xs"
data-ng-class="{disabled : disable}"
data-ng-if="show"><span>Any HTML</span>Reject</button>
I tried trnsculation with replace false and true but not able to achieve this functionality.