DiUS / angular-confirm-click

An AngularJS directive which will display a confirmation message when a user clicks on a button, all inline.
7 stars 7 forks source link

meanjs glyph icons #10

Open ChrisLaurie opened 9 years ago

ChrisLaurie commented 9 years ago

I like this - a lot. I am trying to implement this with the standard meanjs stack and it works except for the display of the delete button. meanjs does not use a button but a link () and instead of the wrd "delete" it uses a glyph icon loaded as image. so my code looks like this:

<a class="btn btn-primary" confirm-click="remove();" confirm-message="Are you sure?">
    <i class="glyphicon glyphicon-trash"></i>
</a>

and now with confirmClick the icon does not display.
kevkha commented 9 years ago

I too have the same issue. Icon not showing in bootstrap button tag.

<button confirm-click="remove(id);" confirm-message="Are you sure?" type="button" class="btn btn-xs btn-danger">
    <span class="glyphicon glyphicon-minus-sign"></span>
</button>

Any update please?

DonovanHumphries commented 8 years ago

@kevkha

kevkha as a quick fix just change the directive to use element.html() instead of .text()

The change I made actionText = element.html();

element.html(actionText);

I'd do pull request but I dont think this is used much or even if its worth it