title: Row index is not available in Angular CDK table
body: <p>I have a simple table like this</p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>&lt;table cdk-table [dataSource]="doors" [multiTemplateDataRows]="true" class="table table-hover"&gt;
    &lt;ng-container cdkColumnDef="width"&gt;
      &lt;th cdk-header-cell *cdkHeaderCellDef&gt;Width&lt;/th&gt;
      &lt;td cdk-cell *cdkCellDef="let row; let idx = index;"&gt;
        Index: [{{idx}}]
        &lt;span *ngIf="idx === undefined"&gt;undefined&lt;/span&gt;
        &lt;span *ngIf="idx === null"&gt;null&lt;/span&gt;
      &lt;/td&gt;
    &lt;/ng-container&gt;
  
    &lt;tr cdk-header-row *cdkHeaderRowDef="['width']"&gt;&lt;/tr&gt;
    &lt;tr cdk-row *cdkRowDef="let row; let i = index; columns: ['width']"&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I need to access row index but it is undefined. What am I doing wrong?</p>
  
  <p>Stackblitz: <a href="https://stackblitz.com/edit/angular-3cknv1" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-3cknv1</a></p>