0

I'm having trouble building ngx datatable, I'm running typescript version 2.5.3 (verified with tsc -version) and I have ngx-datatable version 10.2.3. I've been building the project from inside visual studio and I can see the build command is tsc -P '../tsconfig.json' which seems proper, but when I build ngx-datatable and recompile my angular 4 project which has ngx-datatable as a dependency, I get the following error:

zone.js:2622 GET http://localhost:4200/datatable.component.scss 404 (Not Found)

I've tried renaming the styleUrl inside the datable.component.js file to no avail, am I building this project improperly or is this a bug with the current release?

  • do you have the datatable.component.scss file in the same directory as the rest of your datatable.component? – Chris Sharp Oct 07 '17 at 03:16
  • @ChrisSharp Yes, I literally cloned the repo and ran the typescript builder on the stock code. I checked the release/components folder and it has datatable.component.css, so i renamed it to datatable.component.scss but still no dice – Daniel Wilson Oct 07 '17 at 05:48
  • The error really looks like a reference issue. However, ngx-datatable is defined globally. Have you tried putting your styles in a global style sheet and then using them in the HTML? I had a similar issue where the styles were just being ignored by ngx-table and defining them globally allowed me to style the table. You may also be able to import ngx-datatable directly into your scss file using @import – Chris Sharp Oct 07 '17 at 11:28
  • I'll give it a go, My global style sheet has the material style sheet imported but not the datatable.component.css file – Daniel Wilson Oct 07 '17 at 18:24

0 Answers0