title: React-like component context in Angular2
body: <p>How can I do with Angular similar things I can do with React Context API? For example, something like this:</p>
  
  <pre><code>&lt;&gt;
    &lt;ThemeContext.Provider value="red"&gt;
      &lt;Toolbar /&gt;
    &lt;/ThemeContext.Provider&gt;
    &lt;ThemeContext.Provider value="green"&gt;
      &lt;Toolbar /&gt;
    &lt;/ThemeContext.Provider&gt;
  &lt;/&gt;
  </code></pre>
  
  <p>Here's working example of this: <a href="https://next.plnkr.co/edit/ESWRJapMh8k9wCe9" rel="nofollow noreferrer">https://next.plnkr.co/edit/ESWRJapMh8k9wCe9</a></p>
  
  <p>(I've created similar boilerplate for Angular: <a href="https://next.plnkr.co/edit/OGnIpgnIsVC9wZXb" rel="nofollow noreferrer">https://next.plnkr.co/edit/OGnIpgnIsVC9wZXb</a>. You can just provide a working fork as an answer.)</p>