var app = angular.module('app');

app.controller('LoadModalController',
  function($scope, $uibModalInstance, localStorageService)
  {

    $scope.cancel = function() {
      $uibModalInstance.dismiss('cancel');
    };


    $scope.btnLoadClicked = function() {
      $uibModalInstance.close($scope.projects[$scope.input.name]);
    };


    (function constructor() {
      $scope.projects = localStorageService.get('names') || {};
      $scope.names = _.chain($scope.projects).keys().sortBy().value();
      $scope.input = {};
      $scope.input.name = $scope.names[0];
    })();

  }
);

@@ -265,66 +265,163 @@
     
-$uibModalInstance.close($scope.projects%5B$scope.input.name%5D
+var result = %7B%7D;%0A      result.projectName = $scope.input.name;%0A      result.data = $scope.projects%5B$scope.input.name%5D;%0A      $uibModalInstance.close(result
 );%0A 

load modal return name & data