title: run two Angular functions from the same popup window
body: <p>Would you recommend somthinglike this if I need to run 2 functions, Assign1 and Assign2 from the same popup window? If either one gives an error, the window will close without saving anything. If 
  Not too sure about syntax.</p>
  
  <pre><code>function Assign() {
      Assign1().then(function(isSuccess) {
          if (isSuccess) {
              Assign2();
              saveAndClose();
          } else {
              CloseAndShowError();
          }
      }, function() {
          CloseAndShowError();
      });
  
  }
  </code></pre>
  
  <p>I should specify  that Assign1 and Assign2 are made with promises in their definitions and I need to know if overall the calls are successful </p>