Because just the top-level field changing invalidates everything in the sub-document, a single attribute change would trigger a re-calculation on all attributes and their dependents. This change should significantly improve performance.
9 lines
224 B
JavaScript
9 lines
224 B
JavaScript
Template.home.events({
|
|
"click #addCharacter": function (event, template) {
|
|
Characters.insert({});
|
|
},
|
|
"click #deleteChar": function(event, template){
|
|
console.log("deleting", this);
|
|
Characters.remove(this._id);
|
|
}
|
|
}); |