You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model.set'list', []
model.push'list', 1# doesn't workmodel.set'list.list', []
model.push'list.list', 1# works
Seems like Derby allows root arrays, so the above code should work?
Updated via IRC:
<quangv> i think model.set 'list.items', [] model.push 'list.items', 'test' works though
<quangv> model roots need to be a namespace or something?
<switz> yes
<switz> list is your id
<switz> therefore if you set list, it has to be an object
<switz> it can't be an array or a string
<switz> or a number
<quangv> hey switz, dang I just filed a bug https://github.com/codeparty/racer/issues/71
<quangv> http://derbyjs.com/#paths made it seem that fruits : [] is allowed...
<quangv> switz, that's weird so it can't be a string either?
<switz> local models can be strings
<switz> local models are prefaced with _
<switz> and are not saved to the server
<switz> or database
<quangv> so model.set('title', 'Fruit store') shouldn't be used either?
<switz> no
<quangv> i see
<switz> but you can do page.render('index', {title: 'Fruit store'})
<quangv> okay I am going to copy & paste our convo to the bug i just filed and suggest the documentation be changed.
The text was updated successfully, but these errors were encountered:
Root array methods doesn't work.
Seems like Derby allows root arrays, so the above code should work?
Updated via IRC:
The text was updated successfully, but these errors were encountered: