Hi,
I have a problem with angular meteor that bugs me for several weeks now. Unfortunately, I have not found a solution yet.
I have a control which looks like this:
function ItemsListController($scope, $reactive) {
$reactive(this).attach($scope);
var vm = this;
vm.limit = 5;
vm.helpers({
items: function() {
return Items.find({}, {limit: vm.getReactively('limit')});
}
});
vm.subscribe('items');
vm.increaseLimit = function() {
if (vm.limit < 100) {
vm.limit += 5;
}
};
}
})();
Template looks like this:
<ul>
<li ng-repeat="item in vm.items track by item._id">
{{item.name}} (Number: {{item.number}})
</li>
</ul>
This code is working as expected. The only problem is, that every item is rendered again when vm.limit
is changed. Only the added items should be rendered.
I’m not sure if this is a Meteor or a angular-meteor bug. The user is able to change the limit with a slider, which is working, but since all items are rendered again, the view is flickering.
Does anyone know a solution for this problem?
Regards,
Ben