Skip to content Skip to sidebar Skip to footer

Popconfirm Doesn't Work In Table ()

I'm working in a scala application with playframework, I want to use the popover confirm in a smart-table, I did the install for the popconfirm ('popconfirm':'0.4.3') and it works

Solution 1:

The above code is not working because, it is calling $(".popconfirm").popConfirm(); method before rendering ng-repeat(it render content lazily) content. So it is doing nothing.

For solving the issue, you need to create a directive that will enable popConfirm feature on that button once it get render by ng-repeat. You could use directive link function to get angular compiled element to call popConfirm() method of it.

Directive

app.directive('popconfirm', function(){
  return {
    restrict: 'C',
    link: function(scope, element){
      element.popConfirm();
    }
  }
})

Post a Comment for "Popconfirm Doesn't Work In Table ()"