I have an Angular project with scss styles ext
angular.json
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},...
Then, i have a component that need to use ngx-datatable with themeing, so I import the css files
result.component.ts
@Component({
providers: [HintService],
selector: 'app-result',
styleUrls: [
'result.component.scss',
'../../../../../node_modules/@swimlane/ngx-datatable/release/index.css',
'../../../../../node_modules/@swimlane/ngx-datatable/release/themes/material.css',
'../../../../../node_modules/@swimlane/ngx-datatable/release/themes/bootstrap.css',
'../../../../../node_modules/@swimlane/ngx-datatable/release/assets/icons.css'
],
templateUrl: 'result.component.html'
})
With this code, I dont get the theme working. And I dont get any error of something. I try this then, after reading a similar question Import regular CSS files in SCSS file
result.component.scss
@import "../../../_custom.scss";
@import "~node_modules/@swimlane/ngx-datatable/release/index";
@import "~node_modules/@swimlane/ngx-datatable/release/themes/material";
@import "~node_modules/@swimlane/ngx-datatable/release/themes/bootstrap";
@import "~node_modules/@swimlane/ngx-datatable/release/assets/icons";
But in this case, the paths to the fonts inside ngx-datatables css, get messy
ERROR in ./src/app/menu/transaction/result/result.component.scss
(Emitted value instead of an instance of Error) CssSyntaxError: C:\TeamProjects\Web\Dev\Portal\node_modules\@swimlane\ngx-datatable\release\assets\icons.css:9:4: Can't resolve 'fonts/data-table.svg' in 'C:\Projects\Web\Dev\Portal\src\app\menu\transaction\result'
(the fonts of course are in place, and I don´t have touched the css files of ngx)
Im out of ideas.... can someone point me the right direction?
PD:Sorry my english