title: How do I create a resolver with multiple requests dependent on data from a prior request?
body: <p>I have a component which retrieves its business object from a single HTTP request, and then has several subsequent requests to populate drop-down lists. The arguments in those subsequent requests consist of data from the business object, so those requests can not begin until the first one completes.</p>
  
  <p>Given an example resolver <code>PersonResolver</code>, this is the flow I want to achieve:</p>
  
  <ol>
  <li>Call <code>this.personService.getPersonData()</code>. Returns type <code>Observable&lt;PersonModel&gt;</code>.</li>
  <li>Use the returned <code>PersonModel</code> instance, which we'll call <code>personData</code>, to call <code>this.personService.getAdditionalData1(personData.foo)</code> and <code>this.personService.getAdditionalData2(personData.bar)</code>. Both return type <code>any[]</code>.</li>
  <li>Return type <code>Observable&lt;PersonModel, any[], any[]&gt;</code> from the <code>resolve</code> method.</li>
  </ol>
  
  <p>I would like to implement this into the component's resolver, but I am having a tough time wrapping my head around the correct usage of RxJS I need for the job.</p>
  
  <p>Here's what I've got so far. I got stuck pretty quick.</p>
  
  <pre class="lang-ts prettyprint-override"><code>constructor(private personService: PersonService) { }
  
  resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable&lt;PersonModel, any[], any[]&gt; | Observable&lt;Observable&lt;PersonModel, any[], any[]&gt;&gt; | Promise&lt;Observable&lt;PersonModel, any[], any[]&gt;&gt; {
    this.personService.getPersonData().subscribe(personData =&gt; {
        // what to put in here?
    });
  }
  </code></pre>