title: Angular pass resolve data to child-routes
body: <p>i have the following Component Structure</p>
  
  <ul>
  <li>project
  
  <ul>
  <li>edit-project</li>
  <li>sub-ressource1</li>
  <li>sub-ressource2</li>
  <li>sub-ressource3</li>
  </ul></li>
  </ul>
  
  <p>So my routing looks like this:</p>
  
  <pre><code>const childroutes = [
    {
      path: '',
      children: [
        { path: 'edit', component: EditProjectComponent},
        { path: 'subres1', component: Subres1Component},
        { path: 'subres2', component: Subres2Component},
        { path: 'subres3', component: Subres3Component},
        { path: 'subres4', component: Subres4Component}
      ]
    }
  ]
  
  {
      path: 'project/:projectId', 
      component: ProjectDetailComponent,
      children: childroutes,
      resolve: { project: ProjectResolver} /** resolve Project from ProjectService **/
  }
  </code></pre>
  
  <p>As you can see i resolve my Projectdata from a service and can access them in ProjectDetailComponent via</p>
  
  <pre><code>this.route.snapshot.data
  </code></pre>
  
  <p>So now the question is, how can i pass the data resolved in "EditProjectComponent" to all its childroutes components?</p>
  
  <p>I now that i could do the following to resolve project-data in childcomponents:</p>
  
  <pre><code>const childroutes = [
    {
      path: '',
      children: [
        { path: 'edit', component: EditProjectComponent,resolve: { project: ProjectResolver}},
        { path: 'subres1', component: Subres1Component,resolve: { project: ProjectResolver}},
        { path: 'subres2', component: Subres2Component,resolve: { project: ProjectResolver}},
        { path: 'subres3', component: Subres3Component,resolve: { project: ProjectResolver}},
        { path: 'subres4', component: Subres4Component,resolve: { project: ProjectResolver}}
      ]
    }
  ]
  </code></pre>
  
  <p>But this seems ugly and wrong.</p>