title: How to force child controller to wait for parent controller
body: <p>I've got problem with communicating between parent and child controller,
  situation looks like below. In parent controller I have:</p>
  
  <pre><code>public $onInit = () =&gt; {
      this.swSubviewInfo.resolved.then((response: IDashboardResponseData) =&gt; {
          this.setGroupId(response.opid);
          this.updateTitle(response.objectName);
      });
  }
  
  private setGroupId(groupOpid: string) {
      this.$scope.groupId = parseInt(groupOpid.split("_")[1], 10);
  }
  </code></pre>
  
  <p>I need this value in $onInit in child controller so initiation of child controller should wait for resolving function in parent controller.</p>
  
  <p>What can I do to prevent situation of reading undefined? Thanks for answer.</p>