[英]How to use Derby.js model arrays?
I keep getting Fatal error: [object Object] is not an Array
and then a server crash, whenever I try to use Derby.js/Racer's model array methods, ( push
, insert
) for example. 我不断收到Fatal error: [object Object] is not an Array
每当尝试使用Derby.js / Racer的模型数组方法(例如push
, insert
)时, Fatal error: [object Object] is not an Array
,然后服务器崩溃。
app.ready (model)->
model.set 'list', []
model.push 'list', 'test'
https://github.com/codeparty/racer/issues/71 https://github.com/codeparty/racer/issues/71
The root model has to an object. 根模型必须具有一个对象。 So the below would work. 所以下面的工作。
app.ready (model)->
model.set 'list.list', []
model.push 'list.list', 'test'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.