I want to achieve the below:
- when the checkbox is checked: change the value to green
- When the checkbox is unchecked: change the value to black
CSS:
`<style>
input[type="checkbox"]:checked + value:before{
color: green;
}
</style>`
HTML
<tr class="bg-primary text-white">
<th scope="col" class="text-left">Email 1</th>
</tr>
<ng-container *cdkVirtualFor="let contact of myContact">
<tbody >
<tr style="width:100%; min-height: 30px;">
<td class="text-left " [title]="contact.mail1">
<input type = "checkbox" value="{{contact.emails}}" id="checkboxEmail1"
[checked]="contact.emails === 1 || contact.emails === 3"
(change)="editContactEmail1(contact.id, $event)"
[disabled]="contact.sajpContact != 1" />
{{(contact.mail1.length>25) ? (contact.mail1 | slice:0:25) + '...' : (contact.mail1)}}
</td></tr></tbody></ngcontainer>
input[type="checkbox"]:checked {}