Backbone Collection add strange behavior
Faced with such a strange problem with Backbone collection. I tried to add
new elements in these way:
sortCollection.add([
{id: "recommended", title: 'Recommend movies'},
{id: "popular", title: 'Popular movies'},
{id: "watch", title: 'Watching now'},
{id: "add", title: 'Last Editions'}
]);
But, when I tried to render it one item with id="watch" always
disappeared. Furthermore, if I do console.log(sortCollection.length) there
is only 3 items.
May be someone faced with this situation before? Or know why can it
disappear?
JSFiddle with my code is here - JsFiddle Sample
Thanks for any help or ideas in advance.
No comments:
Post a Comment