Question: In my Angular2 (4.0) app, how can I import stylesheets (css) from a module in node_modules?
I have a module located here:
node_modules/@swimlane/ngx-datatable
I want to import this stylesheet:
node_modules/@swimlane/ngx-datatable/release/index.css
I've tried the following approaches, with no luck:
In my components own scss file:
@import '~@swimlane/ngx-datatable/release/index.css';
In my component:
@Component({
encapsulation: ViewEncapsulation.None,
selector: 'site_table',
template: require('./site_table.html'),
styleUrls: ['./site_table.scss', '@swimlane/ngx-datatable/release/index.css']
})
@import 'node_modules/@swimlane/ngx-datatable/release/index.css'