title: Angular 2+ Using Variable over components (e.g. global)
body: <p>In Angular 2+ I use a navigation component with a button and a click event like the following:</p>
  <pre><code>&lt;button (click)=&quot;navlnk(about, $event)&quot;&gt;About&lt;/button&gt;
  </code></pre>
  <p>In the app.component.html I want to use the variable (here variable: about) from click event, like the following:</p>
  <pre><code>&lt;article #about class=&quot;about active&quot;&gt;
   lorem ipsum
  &lt;/article&gt;
  </code></pre>
  <p>Actually I have the following code in app.component.ts</p>
  <pre><code>navlnk(page: any, event: any) {
      page.classList.add('active'); // Show 'About' &lt;article&gt;
  }
  </code></pre>
  <p>The code works fine, when all the code is placed in one component.</p>
  <p>But how can I export the navigation to it's own component and call variable 'about' in main app.component.html ?</p>
  <p>Can anybody help?</p>