<输入类型='数字'>是自动递增.漏洞? [英] <input type='number'> is auto incrementing. Bug?

查看:29
本文介绍了<输入类型='数字'>是自动递增.漏洞?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我发现了一个关于以下绑定的错误: when using a controller

I think I have found a bug concerning the following binding: <input type='number'> when using a controller

html:

...{ctrl.i}}...

... {ctrl.i}} ...

飞镖:

...@NgController(...)类 AController {国际我= 5;}...

... @NgController(...) class AController { int i = 5; } ...

当修改输入字段时,就会出现无限循环(自动递增或自动递减)

When one modifies the input field, then there is an infinite loop (auto increment or auto decrement)

请注意,使用无作用域时不会发生此问题,例如:

Note that this problem does not happen when using no-scope like in:

...
<input type="number" ng-model="i">
{{i}}
...

这是一个错误吗?有没有办法使用?

Is that a bug? Is there a way to use <input type='number'>?

推荐答案

可能存在错误,但现在似乎已修复.

There may have been a bug, but it appears to be fixed now.

我验证了这个用例在 AngularDart 0.9.10 中有效.

I verified that this use cases work in AngularDart 0.9.10.

这篇关于&lt;输入类型='数字'&gt;是自动递增.漏洞?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆