title: Angularjs updating data in parent scope after modal form submission
body: <p>I am unable to figure out how to update the $scope.dir in the parent scope (DirCrl) from the child scope (ModalCtrl). The view is a simple modal form with a single text input. On submit the text input is bound to mkdir.name in the child scope. The child controller makes a REST call to a database and should  update $scope.dir in the parent scope with the response data. Any guidance will be greatly appreciated. Code snippet below</p>
  
  <pre><code>app.controller('DirCtrl', ['$scope', '$http', function ($scope, $http) {
  
  $scope.dir = {};
  $scope.mySelections = [];
  
  $http({
      method: 'GET',
      url: '//localhost:9090/fx/v1/dir/52cdc7304c3525ac0c5cdd3a'
  })
      .success(function (data, status, headers, config) {
          $scope.dir = data;
          $scope.children = data.children;
      })
      .error(function (data, status, headers, config) {
      });
  
  }]);
  
  var ModalCtrl = function ($scope, $modal, $log) {
  
  $scope.mkdir = {
      name: 'name',
      data: {}
  };
  
  $scope.$parent.ben = 'ben01';
  
  $scope.open = function () {
  
      var modalInstance = $modal.open({
          templateUrl: 'myModalContent.html',
          backdrop: true,
          windowClass: 'modal',
          controller: ModalInstanceCtrl,
          resolve: {
              mkdir: function () {
                  return $scope.mkdir;
              }
          }
      });
  
      modalInstance.result.then(function () {
          $scope.$parent.children = $scope.mkdir.data.children;
      });
  };
  };
  
  var ModalInstanceCtrl = function ($scope, $modalInstance, $http, $log, mkdir) {
  $scope.mkdir = mkdir;
  $scope.submit = function () {
      $log.log('name of directory to create');
      $log.log(mkdir.name);
  
      $http({
          method: 'GET',
          url: '//localhost:9090/fx/v1/dir/52cdcce74c358cdfe2fa2c83'
      })
          .success(function (data, status, headers, config) {
  
            $scope.mkdir.data = data;
          })
          .error(function (data, status, headers, config) {
  
          });
      $modalInstance.dismiss('cancel');
  }
  
  
  $scope.cancel = function () {
      $modalInstance.dismiss('cancel');
  };
  };
  </code></pre>