问题描述
我试图了解我做错了什么。我在页面浏览器上收到错误无法获取和以下错误 Type 'Event' is not assignable to type 'number'.<input type="number" placeholder="amount" [(ngModel1)]="amount">
我觉得问题与以下代码行有关:
converter.component.html
<input type="number" placeholder="amount" [(ngModel1)]="amount">
converter.component.ts
export class ConverterComponent implements OnInit {
amount = 1;
from = 'GBP';
to = 'AUD';
rate = 1.80;
convert(): number {
return this.amount * this.rate;
}
我已经添加了 FormsModule,所以这不是问题。任何帮助,将不胜感激。谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)