Reputation: 83
Im trying to use the value of {{facturaCE.cantidad / 1.16}}
as property value of data-clipboard-text = facturaCE.cantidad / 1.16
This is a fragment of my code
<tr *ngFor="let facturaCE of facturasClientesExistentes">
<td>{{facturaCE.cantidad}} --> {{facturaCE.cantidad / 1.16}}</td>
<td>{{facturaCE.cliente}}</td>
<td>{{facturaCE.correo}}</td>
<td>{{facturaCE.fecha}}</td>
<td>{{facturaCE.sucursal}}</td>
<td>
<button class="btn button" data-clipboard-text="I WANT TO USE HERE">Cantidad
</button>
<button (click)="facturaTerminada('clienteExistente', facturaCE)" class="button alert">Marcar como realizada
</button>
</td>
</tr>
I'm using Clipboard.js thats why have the property data-clipboard-text and it's working if I use some sample text.
Already try to use data-clipboard-text="{{facturaCE.cantidad / 1.16}}"
Upvotes: 0
Views: 428
Reputation: 41533
You should be using as below
<button class="btn button" attr.data-clipboard-text="{{facturaCE.cantidad/1.6}}">
Upvotes: 0
Reputation: 954
Use
[attr.data-clipboard-text]=" facturaCE.cantidad / 1.16"
Or
attr.data-clipboard-text="{{facturaCE.cantidad / 1.16}}"
Upvotes: 1