title: await functionality in angularjs 1.5
body: <p>I am new to angularjs just 1.5 weeks of experience.</p>
  
  <p>My service is returning IPromise. I am using that in controller as :</p>
  
  <pre><code>private GetHeader(): void {
          this._SolutionExplorerHeaderData = this.globalShellService.SolutionExplorerHeaderData;
          this.globalShellService.retrieveHeaderData().then(
              (response: Models.SolutionExplorerHeader) =&gt; {
                  this._SolutionExplorerHeaderData = response;
              });
  }
  </code></pre>
  
  <p>I am calling this method like this:</p>
  
  <pre><code>private InitComponents(): void {
          let statusBar = new LayoutModels.StatusBar(Designer.DesignerTitleKey);
          let designerShell = this.GetDesignerShell();
          let globalCommadBarHandler = this.globalCommandBarService;
          this.GetHeader();
          this.headerModel = new LayoutManager.Models.HeaderModel(this._SolutionExplorerHeaderData.SolutionType,
              this._SolutionExplorerHeaderData.Publisher,
              this._SolutionExplorerHeaderData.InstalledOn,
              this._SolutionExplorerHeaderData.ModifiedOn,
              this._SolutionExplorerHeaderData.LastSaved,
              this._SolutionExplorerHeaderData.LastPublished);
          this.layoutModel = new LayoutManager.Models.LayoutModel(Designer.DesignerName,
              designerShell, statusBar, globalCommadBarHandler, this.headerModel);
      }
  </code></pre>
  
  <p>Now the issue with this is .then() in GetHeader() will return the data a bit late before that header model mapping statement is called.</p>
  
  <p>How should I await(C#) @this.GetHeader() statement so that execution pause at this statement.</p>