After upgrading to 1.1.16-7, I started getting No provider for PaginationConfig! errors.
Was importing PaginationModule in my module declaration and then using in the template:
<pagination [totalItems]="items.length"
[(ngModel)]="currentPage"
[itemsPerPage]="perPage"
previousText="‹"
nextText="›"></pagination>
Worked totally fine for months. No mention of PaginationConfig in the docs or anywhere, for that matter. Downgraded back to 16-3 to get it working.
Versions:
angular: 2.2.3
node: 4.4.2
npm: 3.10.9
You must import them odule with forRoot():
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { PaginationModule } from 'ng2-bootstrap';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
imports: [
AppRoutingModule,
BrowserModule,
PaginationModule.forRoot()
],
declarations: [
AppComponent
],
bootstrap: [ AppComponent ]
})
export class AppModule {}
Great! Thank you.
PaginationModule.forRoot() - Fixed my issue.
Most helpful comment
You must import them odule with
forRoot():