ggmod / angular-2-data-table

An Angular 2 data table, with pagination, sorting, expandable rows, row selection etc.
69 stars 136 forks source link

Datatable is not an NgModule... Anyone has fixed this issue... #20

Open AshwinDeva opened 7 years ago

mehtasagar commented 7 years ago

Me too facing the same problem. Did you found the solution?

AshwinDeva commented 7 years ago

No... Do anyone have work around to compile successfully till fixing it..?

AshwinDeva commented 7 years ago

As a workaround, in index.d.ts file of angular-2-data-table, add the below lines ,

import { NgModule } from 'angular/core'; @NgModule({}) export declare class DataTableModule { }

ericalbers commented 7 years ago

when adding those lines, throws errors about resolving symbols statically ERROR in Error encountered resolving symbol values statically. Could not resolve angular/core relative to /node_modules/angular-2-data-table/dist/index.d.ts., resolving symbol DataTableModule in /node_modules/angular-2-data-table/dist/index.d.ts, resolving symbol DataTableModule in /node_modules/angular-2-data-table/dist/index.d.ts This is still an open bug.

ng -v gives angular/cli: 1.2.7 node: 6.11.1 os: win32 x64 angular/animations: 4.3.3 angular/cdk: 2.0.0-beta.8 angular/common: 4.3.3 angular/compiler: 4.3.3 angular/core: 4.3.3 angular/flex-layout: 2.0.0-beta.8 angular/forms: 4.3.3 angular/http: 4.3.3 angular/material: 2.0.0-beta.8 angular/platform-browser: 4.3.3 angular/platform-browser-dynamic: 4.3.3 angular/router: 4.3.3 angular/cli: 1.2.7 angular/compiler-cli: 4.3.3 angular/language-service: 4.3.3

ericalbers commented 7 years ago

Switching to another table solution, this one does not work.

BayardSmart commented 7 years ago

you don't have to "add" those lines, just add the "@NgModule({})". The export declare class DataTableModule { } is already here, just add the @NgModule part. Worked for me.

nitthi commented 6 years ago

i have a same problem, can anyone please help on this issue or suggest any other table solution like angular-2-data-table.