使用ngx-datatable,自定義css 須要:
在css文件中加入
@import '~@swimlane/ngx-datatable/release/index.css';
@import '~@swimlane/ngx-datatable/release/themes/material.css';
@import '~@swimlane/ngx-datatable/release/assets/icons.css';
而後在ts文件中加入
ViewEncapsulation
import { ViewEncapsulation } from '@angular/core';
@Component({
[...] // other code like template and style urls
encapsulation: ViewEncapsulation.None
})
而後在css文件中自定義的style就生效了