2014-11-02 135 views
0

我一直在使用下面的代码新评论添加到列表的末尾:添加项目到列表的开始

ractive.push('BlogPosts.BlogPostId.Comments', newComment); 

但现在我需要将项目添加到的开始名单。我已经通过ractive文档查看过,但没有成功找到合适的方法。阵列的

回答

1

使用不印字方法:

ractive.unshift('BlogPosts.BlogPostId.Comments', newComment);