title: angular2 set active tab on init
body: <p>I am trying to set active class on a tab in angular2. I am using the ng2-bootstrap plugin for tabs and really do not unterstand how to do it.</p>
  
  <p>From original examples of ng2-bootstrap:</p>
  
  <pre><code>&lt;tabset&gt;
      &lt;tab heading="Static title"&gt;Static content&lt;/tab&gt;
      &lt;tab *ngFor="let tabz of tabs"
           [heading]="tabz.title"
           [active]="tabz.active"
           (select)="tabz.active = true"
           (deselect)="tabz.active = false"
           [disabled]="tabz.disabled"
           [removable]="tabz.removable"
           (removed)="removeTabHandler(tabz)"&gt;
        {{tabz?.content}}
      &lt;/tab&gt;
      &lt;tab (select)="alertMe()"&gt;
        &lt;template tabHeading&gt;
          &lt;i class="glyphicon glyphicon-bell"&gt;&lt;/i&gt; Alert!
        &lt;/template&gt;
        I've got an HTML heading, and a select callback. Pretty cool!
      &lt;/tab&gt;
    &lt;/tabset&gt;
  </code></pre>
  
  <p>So if I want to set the last tab as active on load, how can I access this tab in typescript? The main problem is that I can only acces the tabs which are created in typescript itself, but not the static tabs like the first or the last one.</p>
  
  <p>I like to achieve something like:</p>
  
  <pre><code>ngOnActivate() {
      tab[4].activ=true;
  }
  </code></pre>