I'd like to change the background color of the caption cell of my p-table
in only one component, how can I do?
I tried <ng-template pTemplate="caption" class="myStyle">
and .myStyle{ background: rgb(9,169,121) !important; }
in my.component.scss
but it doesn't work.
Help me! Thanks!
Edit: Finally it works! I see the answer of @Antikhippe, but I had to add
:host ::ng-deep { #myTable {
.p-datatable-thead{ background: red;
} .p-datatable .p-datatable-thead > tr > th { background: inherit; } } }