title: Extend angularUI popover directive to create a confirm popover
body: <p>I am trying to create a easy confirm popover when in angularJS. I'm already using AngularUI for many other components which is why it seems like the natural choice to extend. </p>
  
  <p>I have created a example in plnkr but essential I would like to be able to simply add a confirm to a button like this...</p>
  
  <pre><code>&lt;button confirm="Are you sure you want to delete what ever" confirm-func="deleteThing()" confirm-placement="right" confirm-title="Are you sure?" class="btn btn-default"&gt;Delete?    &lt;/button&gt;
  </code></pre>
  
  <p>and this works and produces the popover with a cancel or confirm by using my own template. But i need to be able to pass through what ever function in the "confirm-func" attribute to run on confirmation click. What ever I do I can't get it to work. Here is my directive that extends the angularUI...</p>
  
  <pre><code>angular.module('plunker', ['ui.bootstrap']).directive( 'confirmPopup', function () {
    return {
      restrict: 'A',
      replace: true,
      scope: { title: '@', content: '@', placement: '@', animation: '&amp;', isOpen: '&amp;', func: '&amp;' },
      templateUrl: 'confirmPopup.html',
      link: function ($scope, element, attrs) {
        $scope.confirm = function(){
  
          $scope.func();//here is where we want to run the function, but it does not work!
          $scope.$parent.tt_isOpen = false;
        }
        $scope.cancel = function(){
          $scope.$parent.tt_isOpen = false;
        }
      }
    };
  })
  .directive( 'confirm', [ '$tooltip', function ($tooltip) {
      return $tooltip( 'confirm', 'confirm', 'click' );
  }]);
  </code></pre>
  
  <p>Plunkr example attached: <a href="http://plnkr.co/edit/W9BWMc3x5khuaMEL7lp1?p=preview" rel="nofollow">http://plnkr.co/edit/W9BWMc3x5khuaMEL7lp1?p=preview</a></p>