Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. .state('rates.rate.runexperiment', {
  2. url: "/runexperiment",
  3. onEnter: ['$stateParams', '$state', '$modal', '$timeout', 'ExpsService', function($stateParams, $state, $modal, $timeout, ExpsService){
  4. var modalInst = $modal.open({
  5. templateUrl: "templates/ExpsResults.html",
  6. windowClass: "full",
  7. controller: ['$scope', '$state', '$timeout', function($scope, $state, $timeout) {
  8.  
  9. $timeout(function(){
  10. $("#modal").resizable();
  11. },0);
  12.  
  13.  
  14. $scope.expResults = null;
  15.  
  16. $scope.getExpResults = function(){
  17. ExpsService.getExpResults('1000').then(function(response){
  18. $scope.expResults = response;
  19. });
  20. };
  21.  
  22. $scope.close = function() {
  23. $scope.$close(true);
  24. $state.go('rates.rate');
  25. };
  26.  
  27. $scope.getExpResults()
  28. }]
  29. });
  30.  
  31.  
  32. modalInst.result.then(function(){
  33.  
  34. }, function(){
  35. $state.go('rates.rate');
  36. });
  37. }]
  38. })
  39.  
  40. $timeout(function(){
  41. $("#modal").resizable();
  42. },0);
  43.  
  44. <div class="modal-header" id="modal">
  45. <h3>
  46. Exp Results
  47. <span class="pull-right">
  48. {{expResults.name}}
  49. </span>
  50. </h3>
  51. <ul ng-repeat=data in expResults>
  52. <li>{{data}}</li>
  53. </ul>
  54. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement