title: Angular Pipe could not be found in Jasmine test
body: <p>I'm getting an error using Jasmine to test one of my angular 6 components:</p>
  
  <p>The pipe 'paginate' could not be found ("]Item of activityLogDisplay.data | paginate: config; let index = index"       (click)="): ng:///DynamicTestModule/ActivitylogComponent.html@59:34
  'pagination-controls' is not a known element:</p>
  
  <p>I'm using NgxPaginationModule that I installed with the following command:</p>
  
  <pre><code>npm install ngx-pagination --save
  </code></pre>
  
  <p>So, note that I'm not using a custom pipe that I created myself, I'm using one that belongs to a package that I downloaded. My component test is failing on the use of a pipe and not on testing the pipe itself. Here's what my use of the pagination pipe looks like in my html template:</p>
  
  <pre><code> &lt;li class="list-group-item list-group-item-action" 
      *ngFor="let alItem of activityLogDisplay.data | paginate: config; let index = index" 
      (click)="toggleALView(alItem.index)"&gt;
  </code></pre>
  
  <p>Here's what my spec.ts file looks like (pretty much out of the box):</p>
  
  <pre><code>import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  import { ActivitylogComponent } from './activitylog.component';
  
  describe('ActivitylogComponent', () =&gt; {
    let component: ActivitylogComponent;
    let fixture: ComponentFixture&lt;ActivitylogComponent&gt;;
  
    beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
        declarations: [ ActivitylogComponent ]
      })
      .compileComponents();
    }));
  
    beforeEach(() =&gt; {
      fixture = TestBed.createComponent(ActivitylogComponent);
      component = fixture.componentInstance;
      fixture.detectChanges();
    });
  
    it('should create', () =&gt; {
      expect(component).toBeTruthy();
    });
  });
  </code></pre>
  
  <p>I've tried adding the import of NgxPaginationModule to the spec.ts file:</p>
  
  <pre><code>import { NgxPaginationModule } from 'ngx-pagination';
  </code></pre>
  
  <p>And I've included it in the declarations area of the TestBed config:</p>
  
  <pre><code>  beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
        declarations: [ ActivitylogComponent, NgxPaginationModule ]
      })
      .compileComponents();
    }));
  </code></pre>
  
  <p>The error message changes to:</p>
  
  <pre><code>Failed: Unexpected module 'NgxPaginationModule' declared by the module 
  'DynamicTestModule'. Please add a @Pipe/@Directive/@Component annotation.
  </code></pre>
  
  <p>In my app.module.ts file, I've got NgxPaginationModule listed in the imports array and not the declarations array:</p>
  
  <pre><code>import { NgxPaginationModule } from 'ngx-pagination';
  
  @NgModule({
    declarations: [
      AppComponent,
      ActivitylogComponent
    ],
    imports: [
      BrowserModule,
      FormsModule,
      HttpClientModule,
      NgxPaginationModule,
      RouterModule.forRoot(appRoutes,{useHash:true})
    ],
    providers: [IndexService, AdminIndexService],
    bootstrap: [LandingpageComponent]
  })
  </code></pre>
  
  <p>Any ideas what I need to do to get this test to work?</p>