Home     Source

SLV Confirmation Popopver (Angular 5)


A link element which triggers delete event has the following code:

    <a href="javascript: ;"
       class="pull-right"
       (click)="deleteItem(idx)"
       slv-confirm="To delete "{{item.name}}"?"
       placement="left">
      <i class="fa fa-trash-alt text-danger"></i>
    </a> 

slv-confirm directive shows a confirmation popover to make sure if a user really want to delete an object.

Pay attention that the directive inherits options of ngx-popover. So, here the popover is placed left with help of placement="left".