我不知道如何在索引中使用Ember.JS中的Ember.set功能。目前,我一直在使用以下代码来实现此功能:
this.get('array')[index1][index2].value = value.target.value;
但是,这始终会产生以下错误:
ember.debug.js:16664 Uncaught Error: Assertion Failed: You must use Ember.set() to set the `value` property (of [object Object]) to `xxx`.
我认为解决方案应如下所示:
this.set('array'[index1][index2], value.target.value);
但是,我已经尝试了上述解决方案的许多不同形式,但它们似乎都不起作用。
数组的示例如下所示:
matchingArray: [ [{ "property": 'pathname', "variable": null, "equal": true, "operator": 'equals', "value": null }] ]
我正在将Ember v1.13与Node v4.4.3一起使用
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句