title: Angular's `@Host` decorator not reaching the top?
body: <p>In my main <code>app.ts</code> I've declared a global provider : </p>
  
  <pre><code>providers: [{provide: Dependency, useValue: createDependency('AppModule provider')}]
  </code></pre>
  
  <p>(<em>Where <code>createDependency</code> is just a function that returns a class which has a <code>getName()</code> method.</em>)</p>
  
  <p>I also have a components : </p>
  
  <pre><code>    &lt;my-app-component-3&gt;Hello from 3&lt;/my-app-component-3&gt;
  </code></pre>
  
  <p>Code : </p>
  
  <pre><code>@Component({
      selector: 'my-app-component-3',
      template: `
          &lt;div&gt;Component3:
              &lt;ng-content&gt;&lt;/ng-content&gt;
              : &lt;span [innerHTML]="dependency?.getName()"&gt;&lt;/span&gt;
          &lt;/div&gt;
      `,
  
  })
  export class Component3 {
      constructor(@Host() @Optional() public dependency: Dependency) {}
  }
  </code></pre>
  
  <p>The result is:</p>
  
  <blockquote>
    <p>Component3: Hello from 3 :</p>
  </blockquote>
  
  <p>But I expect the result to be : </p>
  
  <blockquote>
    <p>Component3: Hello from 3 :<strong>AppModule provider</strong></p>
  </blockquote>
  
  <p>Because basically the app structure is : </p>
  
  <pre><code>&lt;my-app&gt;
    &lt;my-app-component-3&gt;
    &lt;/my-app-component-3&gt;
  &lt;/my-app&gt; 
  </code></pre>
  
  <p><strong>Question:</strong><br>
  Why doesn't <code>@Host()</code>  match the parent provider ?  </p>
  
  <p><em>(which is   : <code>providers: [{provide: Dependency, useValue: createDependency('AppModule provider')}]</code>)</em></p>
  
  <p>To my knowledge - the injector should seek for a <code>Dependency</code> in this manner : </p>
  
  <p><a href="https://i.stack.imgur.com/1W1lF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1W1lF.png" alt="enter image description here"></a></p>
  
  <p>So why doesn't it find it ?</p>
  
  <p><a href="https://plnkr.co/edit/qpsUzaAywtkN6JfbFXMb?p=preview" rel="nofollow noreferrer"><strong>PLUNKER</strong></a></p>
  
  <p><strong>Notice</strong></p>
  
  <p>I already know that if I remove <code>@host</code> - it does reach the top. My question is why adding @host - is not reaching the top - despite the fact that<code>my-component3</code> is under <code>my-app</code> !!</p>