I am working with the following Angular2 code:
<ngx-datatable-column prop="id" name="ID">
<template ngx-datatable-cell-template let-row="row" let-value="value">
<a [routerLink]="['/devicedtls',row.id]">{{row.id}}</a>
</template>
</ngx-datatable-column>
Now, I am attempting to insert attr.data-div="ID Test"
inside <template......
<ngx-datatable-column prop="id" name="ID">
<template ngx-datatable-cell-template let-row="row" let-value="value" attr.data-div="ID Test">
<a [routerLink]="['/devicedtls',row.id]">{{row.id}}</a>
</template>
</ngx-datatable-column>
In my CSS, I aim to access the value of attr.data-div
using:
.datatable .datatable-body .datatable-body-cell:before {
content: attr(data-div)": ";
}
However, when I check it in a browser, ": " is displayed, but the value of data-div
does not show up.
Could you please help me identify what might be wrong or missing here? Any assistance would be greatly appreciated. Thank you!