Open iouakrim opened 7 years ago
Add to imports FormsModule
Tank you very much , it solve the problem
the problem was solved by adding .forRoot(), to PaginationModule in imports
who should close this?
I didn't find PaginationModule import {Ng2TableModule} from 'ng2-table/ng2-table'; import { NgTableComponent, NgTableFilteringDirective, NgTablePagingDirective,NgTableSortingDirective } from 'ng2-table/ng2-table';
@NgModule({ imports: [ CommonModule, FormsModule, NgaModule, TreeModule, Ng2TableModule, FormsModule, routing ], declarations: [ Components, Metrics, UserProfile ]
Nothing to do with FormsModule, it requires ng2-bootstrap && PaginationModule.forRoot() at imports.
import {Ng2TableModule} from 'ng2-table/ng2-table'; import { PaginationModule } from "ng2-bootstrap/pagination"; // from ng2-bootstrap @NgModule({ imports: [
Ng2TableModule,
PaginationModule.forRoot(),
],
Hi , I'm trying to use ng2-table in my project but i get this error in browser console :
Unhandled Promise rejection: Template parse errors: Can't bind to 'totalItems' since it isn't a known property of 'pagination'. (" class="pagination-sm" [(ngModel)]="page" [ERROR ->][totalItems]="length" [itemsPerPage]="itemsPerPage" [maxSize]="maxSize"
ᐧ