title: Call function on close of ngDialog
body: <p>I open an alert dialog with ok button. On click calls a function. I need to call the same function when I close the alert dialog</p>
  
  <pre><code>&lt;script type="text/ng-template" id="alertErrorTemplate.html"&gt;
      &lt;div class="form-wrp"&gt;
          &lt;div class="form-item"&gt;
              &lt;h2 class="box-title error-text" ng-class="{'box-left': leftAlign}"&gt;&lt;span data-ng-bind="Web_Error" ng-show="showTitleText"&gt;Error: &lt;/span&gt;{{alertText}}&lt;/h2&gt;
              &lt;h2 class="box-text error-text" ng-class="{'box-left': leftAlign}" ng-show="secondaryText !== null"&gt;{{secondaryText}}&lt;/h2&gt;
              &lt;div ng-show="alertItemList &amp;&amp; alertItemList.length &gt; 0" class="dialog-error-list error-text"&gt;
                  &lt;ul&gt;
                      &lt;li ng-repeat="item in alertItemList"&gt;
                          {{ item }}
                      &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-item text-center"&gt;
              &lt;button ng-click="closeNgDialog()" class="btn btn-success btn-big" data-ng-bind="Web_OK"&gt;OK&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/script&gt;
  </code></pre>