title: Execute function when modal is closed (Plunker attached)
body: <p>I have a minor bug which i am not able to fix. Here is the plunker-> <a href="http://plnkr.co/edit/D3EjXKf48Sq2vuc5MHNx?p=preview" rel="nofollow">http://plnkr.co/edit/D3EjXKf48Sq2vuc5MHNx?p=preview</a></p>
  
  <p>When the user opens the modal and makes selection, he chooses to close the modal by pressing 'Ok' </p>
  
  <p>At this point of time, i want to execute ExecOnModalClose() function mentioned in the controller. </p>
  
  <p>So, here is the code i tried. </p>
  
  <pre><code>$scope.ok = function() {
      $uibModalInstance.close();
      $scope.ExecOnModalClose();
  };
  </code></pre>
  
  <p>Execute this function below when user presses 'Ok' as shown above.</p>
  
  <pre><code>$scope.ExecOnModalClose = function() {
       console.log("Execute this after modal closes on pressing Ok"); 
  }
  </code></pre>
  
  <p>Can someone please let me know how to link these two. </p>