< input type ='number'>是自动递增。 Bug? [英] <input type='number'> is auto incrementing. Bug?

查看:168
本文介绍了< input type ='number'>是自动递增。 Bug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我在使用控制器时发现了一个关于以下绑定的错误:< input type ='number'>



html:



...

{ctrl.i}}
...



dart:



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



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



请注意,在使用无范围的情况下不会发生这个问题,例如:

  ... 
< input type =numberng-model =i>
{{i}}
...

这是错误吗?有没有办法使用< input type ='number'>

解决方案<



我确认这个用例在AngularDart 0.9.10中有效。

p>

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

html:

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

dart:

... @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.

I verified that this use cases work in AngularDart 0.9.10.

这篇关于&lt; input type ='number'&gt;是自动递增。 Bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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