How Will I integrate this angular2-data-Table with angular-cli ? Can you please show me a roadmap ?
This is not ready for use yet, I'll update you when its ready :)
GodSpeed :D :D
@amcdnl Could you please mention this in the README? Thanks for your work!
It is ready for use now, I haven't used Angular-CLI can you guys provide feedback?
Can you retry, this should be fixed now.
I try to use angular-cli complie angular2-data-table, but It says "Cannot find module 'angular2-data-table'". Could you please add index.d.ts in root folder. This file contains "export * from './src/angular2-data-table';". this will help to success complie.
AngularCLI is changing quite a bit, I'm gonna hold on too much hacking on it until its stabilized. See: https://twitter.com/ladyleet/status/755961596396998656
Adding an index.d.ts shouldn't be too much of an issue it seems? It's the default way of providing an entry point to a package. Even without considering angular-cli it would be nice.
[Edit:] I've added a pull request that fixes this: https://github.com/swimlane/angular2-data-table/pull/42
Merged his change, I'll release update shortly if you guys wanna retest
Any updates here?
Did you release it to npm?
Yes :)
Is there way to use this modul in angular-cli ? Your npm release is 2 weeks ago.
I'm not sure I follow, can u give an example?
I have problem with importing module, ng build shows error 'Cannot find module 'angular2-data-table'. I have latest version 0.1.15 from npm.
I think the problem is that there is no npm release which includes this pull request, because this code has been merged a week ago and the last npm release is from two weeks ago.
With 0.1.16 I am getting the following errors:
Right in the editor, when importing, I get:
Exported external package typings file 'c:/Users/user/project/node_modules/angular2-data-table/release/angular2-data-table.d.ts' is not a module. Please contact the package author to update the package definition.
Then when building with webpack I get:
ERROR in [default] C:\Users\user\project\node_modules\angular2-data-table\release\angular2-data-table.d.ts:1:0
Cannot find type definition file for 'core-js'.
ERROR in [default] C:\Users\user\project\node_modules\angular2-data-table\release\angular2-data-table.d.ts:161:18
Cannot find name 'IntersectionObserver'.
ERROR in [default] C:\Users\user\project\node_modules\angular2-data-table\release\angular2-data-table.d.ts:420:4
Import or export declaration in an ambient module declaration cannot reference module through relative module name.
I am using angular-cli: 1.0.0-beta.11-webpack.2.
I make it work with 1.0.0-beta.11-webpack.2. Not sure there is any better solution, but it's work for my project.
"lib": ["es6", "dom"],
"types": [
"node"
]
Maybe we should add some better docs, packaging of this stuff is pretty edge right now so its a learning curve for all of us
The @work-k cheat works to me! Thanks!
@amcdnl I could write the how to configure using angular-cli if you wish it. Should I create an new file .md in the documentation directory?
Ya, that would be awesome!
I am getting loads of new errors when building with webpack through angular-cli. Every import from release/angular2-data-table.d.ts is failing.
@adrm can u try on 0.2.4? I'm hoping that might be the fix.
using 0.2.4 I get the following error after importing Angular2DataTableModule...
ERROR in [default] /Users/jared/code/project/node_modules/angular2-data-table/release/models/TableOptions.d.ts:1:0
Cannot find type definition file for 'core-js'.
@szechyjs Interesting, others have reported this issue. We are using TS 2.0 internally with the core-js types set in the tsconfig - https://github.com/swimlane/angular2-data-table/blob/master/tsconfig.json#L24. Try setting that and see what happens.
@DanielRosenwasser any thoughts on best solution for these guys?
One issue is that the types field in your package.json won't work for 1.8 users. You can use the typings field in the mean time. I'll see how possible it would be to update 1.8 to understand 'types'.
Also, if you're on TS 2.0 and depending on @types/core-js, something that should generally work for pre-2.0 users is to add the core-js declaration file via Typings. So your library consumers would write:
typings install --global dt~core-js
Same way they've always used Typings. Hope that helps!
@DanielRosenwasser Whats the best way to include that as part of the project for users? Include typings as part of the project?
@types is the best way to include the appropriate.d.ts files. That's actually part of the reason that we did it for 2.0.
I'm not aware of how others can transitively make their dependencies available when using typings though. It's a pretty manual process unfortunately.
But definitely don't include the files you installed from typings in your repo - that will only cause a bunch of other problems (due to versioning and conflicts if you have duplicates).
I've been trying to get this running using angular-cli for a few days, thanks for the new docs and work btw. Any help would be great!
After following the angular-cli install instructions, I'm receiving the following:
http://localhost:4200/vendor/angular2-data-table/release/components/datatable.scss.js as "./datatable.scss" from http://localhost:4200/vendor/angular2-data-table/release/components/DataTable.js ; Zone:
it's from line 18: require('./datatable.scss');
Using 0.2.5
ERROR in [default] /node_modules/angular2-data-table/release/models/TableOptions.d.ts:1:0
Cannot find type definition file for 'core-js'.
node_modules\angular2-data-table\tsconfig.js looks like this:
"lib":["es6","dom"],
"types": [
"node"
]
node_modulestypescriptpackage.json
...
"raw": "[email protected]",
...
Can one of you guys encountering this issue extract your code to github repo that illustrates the issue?
I want to help but kinda new to this, can you please be more exact in your needs ? I suppose you want everything but the node_modules folder ?
Make a demo project that illustrates the issue please.
https://github.com/dave1374/angular2-data-table-.0.2.5-issue
removed the node_modules folder.
Hope it helps.
Removing /// < reference types="core-js" /> from
node_modules\angular2-data-table\release\models\TableOptions.d.ts
allows me to build successfully.
I just upgraded angular-cli + ng2-inline-editor + angular2-data-table and everything is working properly if you remove the line commented by @dave1374. Thanks!
0.3.3 shouldn't have that comment at all.
@amcdnl I just downloaded from npm (angular2-data-table-0.3.3).
Most helpful comment
I've been trying to get this running using angular-cli for a few days, thanks for the new docs and work btw. Any help would be great!
After following the angular-cli install instructions, I'm receiving the following:
http://localhost:4200/vendor/angular2-data-table/release/components/datatable.scss.js as "./datatable.scss" from http://localhost:4200/vendor/angular2-data-table/release/components/DataTable.js ; Zone: ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost:4200/vendor/angular2-data-table/release/components/datatable.scss.js(…)
it's from line 18: require('./datatable.scss');