【发布时间】:2018-07-19 18:13:22
【问题描述】:
我在我的 formcontrolname 上应用数字管道。 formcontrolname 对 html 中的某些操作具有价值。 当表单加载时,它有空值。 下面是我的代码,我在加载屏幕时看到下面的错误。
当 tempValue 为 123 时,我需要显示 123.00 如果值为 777.45,我需要显示 777.45
<input type="number" formControlName="{{tempValue | number:'3.2'}}" id="tempValue" name="tempValue" >
错误错误:InvalidPipeArgument: '[object HTMLInputElement]' for pipe 'DecimalPipe'
【问题讨论】:
标签: angular pipe form-control