title: Angular 2: ngFor index only increment if case met
body: <p>Let's say I have an array of objects that I'm looping through:</p>
  
  <pre><code>arr = [ {a: 1}, {a: 2}, {a: 1} ]
  </code></pre>
  
  <p>and I want to display the index of the object in my view, but I only want the index to increment if a condition is met.  Something like <code>a == 1</code>.  So if I had some code such as:</p>
  
  <pre><code>&lt;!-- I know this won't work --&gt;
  &lt;ul&gt;
    &lt;li *ngFor="let obj of arr; let i = index"&gt;{{ i }}&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>...it would display as:</p>
  
  <pre><code>&lt;li&gt;0&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;1&lt;/li&gt;
  </code></pre>