In my app I have the can.Model.List of articles, which have attribute
"position". When I changing that attribute I want that
articles will reordering in a document (DOM). The easiest way is do
rerender the peace of view. So in my view I have something like:
- {{#if someStupidVariableName}}
- {{#each articles}}
- <div class="articleItem">{{name}} {{date}} {{position}}</div>
- {{/each}}
- {{/if}}
And in my code I have:
- ViewModel.attr('someStupidVariableName', false);
- ViewModel.attr('someStupidVariableName', true);
But I think there are a better way to solve this.