title: ngDialog - closeModal event - angularjs
body: <p>Is there any event that fires when the popup is closed.</p>
  
  <p>The modal opens on a click event. The modal has a close button, but also gets closed when user clicks anywhere outside the modal div.</p>
  
  <p>Would like to perform some actions, whenever the popup is closed.
  I know how to write the function on click of that close button, but what if the modal is being closed by some other action.</p>
  
  <pre><code>app.controller('MainCtrl', function ($scope, ngDialog) {
  $scope.clickToOpen = function () {
  ngDialog.open({ template: 'popupTmpl.html' });
  };
  });
  </code></pre>