【发布时间】:2017-09-10 11:07:40
【问题描述】:
我已经写了thousandsSeparatorPipe,它与label 一起工作正常,如下所示。
<ion-label fixed>{{project.contingency | thousandsSeparatorPipe}}</ion-label>
但是我如何将pipe 应用到ion-input?因为当用户在下面的numeric 框中键入时,我需要显示千位分隔符。有什么帮助吗?
<ion-input type="number" formControlName="budget" [(ngModel)]="project.budget" ></ion-input>
【问题讨论】:
-
您可以编写自定义指令来格式化输入值。这里:blog.ngconsultant.io/…
标签: angular typescript ionic3 angular2-pipe