title: passing concatMap result in to next concatMap in rxjs
body: <p>You can see I have a method , which is working fine as I expected</p>
  
  <pre><code>loadTemplates(configUrl: any, templateId: string): Observable&lt;any&gt; {
      this.getConfiguration(configUrl)
        .pipe(
  
          concatMap(configResponse =&gt;
            this.getTemplate(
              CONFIGURATION_URL +
                "templates/" +
                configResponse.TemplateSettings.RootTemplate.Path,
              configResponse
            )
          ),
          concatMap(rootTemplate =&gt;
            this.templateEngine.getAllChildTemplates(rootTemplate)       
          ),
          concatMap(childTemplates=&gt;this.templateEngine.createTemplateToRender(childTemplates,""))
        )
        .subscribe(finalresponse=&gt; {
  
          debugger;
        });
  
    }
  }
  </code></pre>
  
  <p><strong>Execution</strong> </p>
  
  <ol>
  <li>getTheConfiguration() => basedontheconfigresponse=></li>
  <li>calling
  getTemplate(basedontheconfigresponse)=>basedntheTemplateresponse=></li>
  <li>calling getAllChildTemplates(basedntheTemplateresponse )=>
  basedonthechildtemplateresponse=></li>
  <li>calling createTemplate(basedonthechildtemplateresponse,"")</li>
  </ol>
  
  <p>in the 4 bullet point I passing an empty parameter to the <strong>createTemplate</strong> method , actually I have to pass <strong>basedntheTemplateresponse</strong>(in code <strong>rootTemplate</strong>). Right now I am doing a tweak by setting up when execute <strong>getAllChildTemplates</strong></p>
  
  <pre><code>getAllChildTemplates(parentTemplate: string) {
      this.currentrootTemplate = parentTemplate;
      var services = this.getChildTemplateServiceInstance(parentTemplate);
      return forkJoin(services);
    }
  </code></pre>
  
  <p>is there any right way to pass the <strong>rootTemplate</strong> from the pipe itself to the next <strong>concatMap</strong> ? I am not sure is this is the right approach.</p>