0

我想今天将我的 Ember CLI 版本从 0.1.15 更新到 0.2.3。当然,其中一部分是升级到新的 HTMLBars 渲染引擎。但是现在,我看到一些非常奇怪的行为,因为我的{{input}}助手在将它们传递给值时不再正确绑定到计算属性。相反,它们被评估为字符串,即使它们不包含引号。例如:

{{input type="text" value=deviceId}}

字面上显示为一个文本框,其值等于字符串 deviceId,而不是实际计算的属性。奇怪的是,当我使用已弃用的 valueBinding 而不是这样的值时:

{{input type="text" valueBinding=deviceId}}

它工作正常,但会引发弃用消息。我找不到其他遇到类似问题的人。有人对可能是什么问题有想法吗?

非常感谢!

4

2 回答 2

0

I figured out what was going on. I was using ember-easyForm, which overwrites the input helper explicitly. EasyForm does not yet support Ember 1.11, and is known to break {{input}} across the application outside of a {{#form-for}} as described here

于 2015-04-21T01:12:05.713 回答
0

尝试这个:

{{input type="text" value=model.deviceId}}

我最近更新了我的一个项目,并在模型前面加上前缀就可以了。

于 2015-04-20T23:36:10.087 回答