我需要在我的 Angular UI 中以百分比格式显示数字。目前它正在渲染实际值。因此,如果它是 2%,则显示为 0.02。我需要将其显示为 2%
<click-input contenteditable="true" *ngIf="item.fieldInfo.dataCategory == fieldCategories.percent" [classNames]="['percentage']">
<input [(ngModel)]="item.value" name="item.fieldInfo.key" required min="0" max="999999999999999"/>
</click-input>
CSS
table {
tbody {
td {
div.percentage {
padding:0.5rem;
&:after {
content: '%';
}
}
}
}
}
最佳答案
关于html - 数字未以 Angular 4 显示为百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48689853/