javascript - Add item to the beginning of the list -
this question has reply here:
how can add together new array elements @ origin of array in javascript? 6 answersi've been using next code add together new comment end of list:
ractive.push('blogposts.blogpostid.comments', newcomment);
but need add together item origin of list. i've looked through ractive documentation did not succeed in finding appropriate method.
use unshift method of array:
ractive.unshift('blogposts.blogpostid.comments', newcomment);
javascript ractivejs
No comments:
Post a Comment