Hi,
I have a data 0.34 I want to output it into 34
<ion-content>
<p>0.34</p>
</ion-content>
Hi,
I have a data 0.34 I want to output it into 34
<ion-content>
<p>0.34</p>
</ion-content>
let item = '0.34';
let newValue = item.split('.')[1];
How can I do it if it’s coming from API?
<ion-content *ngFor="let data of datas">
<p>{{ data.sThreePointersPercentage }}</p>
</ion-cotent>
output: 0.340
let item = data.sThreePointersPercentage.toString();
let newValue = item.split('.')[1];
I update my answer right now
<ion-content *ngFor="let data of datas">
<p>{{ data.sThreePointersPercentage }}</p>
</ion-cotent>
output: 0.340
@avishai_peretz_dev thanks
removezero(data) {
let item = data.sThreePointersPercentage.toString();
let newValue = item.split('.')[1];
return newValue;
}