title: How to set Bootstrap navbar "active" class in Angular 2?
body: <p>How can I set Bootstrap navbar "active" class in Angular 2? I only found <a href="https://stackoverflow.com/questions/16199418/how-do-i-implement-the-bootstrap-navbar-active-class-with-angular-js">Angular 1 way</a>.</p>
  
  <p>When I go to <strong>About</strong> page, add <code>class="active"</code> to <strong>About</strong>, and remove <code>class="active"</code> on <strong>Home</strong>.</p>
  
  <pre><code>&lt;ul class="nav navbar-nav"&gt;
      &lt;li class="active"&gt;&lt;a [routerLink]="['Home']"&gt;Home&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a [routerLink]="['About']"&gt;About&lt;/a&gt;&lt;/li&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Thanks</p>