title: ngdialog - close the parent dialog when opening the child dialog
body: <p>I have a scenario like below graph:
  <a href="https://i.stack.imgur.com/42WdZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/42WdZ.png" alt="enter image description here"></a></p>
  
  <p>I need to close the parent dialog when i just open the child dialog, how can i achieve that?</p>
  
  <p>I tried like using closing API just before opening the child dialog, the parent dialog is closed, but all the data needed in the child dialog will be undefined. If i do not close it, the data in child dialog can be displayed well.</p>
  
  <pre><code>$scope.selectServerToOpen = function (serverType) {
      var newScope = $scope.$new(true);
      newScope.newServer = $scope.newServer;
      $scope.closeThisDialog('cancel');//coment this line, the data can be passed correctly, but i need to close the parent dialog when i open the child dialog
      modalInstance = ngDialog.open
                  template: 'servers/templates/servers-new.tpl.html',
                  scope: newScope,
                  controller: 'newServerCtrl',
                  resolve: {
                      serverData: function () {
                          return null;
                      },
                      delegate: callbackWrapper
                  }
              });
  </code></pre>