title: Angular 2 - How to receive a variable inside a ngFor scope
body: <p>I have a simple component like this:</p>
  
  <pre><code>export class MysidebarComponent implements OnInit {
      activen: number
      {...}
  }
  </code></pre>
  
  <p>and I want in inside an ngFor when the index equals with active, a class to be added.</p>
  
  <pre><code>&lt;a href="#" class="list-group-item" *ngFor="let item of items; let i = index;" [class.active]="i==activen"&gt;{{ item }}&lt;/a&gt;
  </code></pre>
  
  <p>Can you help me?
  Thank in advance</p>