title: Angular 6 The pipe 'index' could not be found
body: <p>Currently when using Angular 6 I am getting the following error when I try to use the index pipe for NgFor:</p>
  
  <pre><code>Uncaught Error: Template parse errors:
  The pipe 'index' could not be found ("
  &lt;ul class="list-unstyled"&gt; &lt;li *ngFor="l[ERROR -&gt;]et s of grouplesson.start | index as i"&gt;
  &lt;span cl"): ng:///ModalModule/GrouplessonsComponent.html@80:61
  </code></pre>
  
  <p>code snippet:</p>
  
  <pre><code>&lt;li *ngFor="let s of grouplesson.start | index as i"&gt;
      &lt;span class="time__start"&gt;{{s | date:'HH:mm'}}&lt;/span&gt;
      &lt;span&gt; - &lt;/span&gt;
      &lt;span class="time__end"&gt;{{grouplesson.end[i] | date:'HH:mm'}}&lt;/span&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I find this weird as the loop does work when not using the pipe, and I also properly import the commonmodule in the ModalModule as far as I can tell:</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { ModalComponent } from './modal.component';
  
  import { ModalService } from './services/modal.service';
  import { GrouplessonsComponent } from './components/grouplessons/grouplessons.component';
  
  @NgModule({
    imports: [
      CommonModule
    ],
    declarations: [ModalComponent, GrouplessonsComponent],
    providers: [ModalService],
    exports: [ModalComponent, GrouplessonsComponent]
  })
  export class ModalModule { }
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <ul>
  <li>interesting note: the date pipes <strong>do</strong> work.</li>
  </ul>