Exploring the use of Backbone, Marionette (1.8.3), StickIt, and TypeScript to effectively bind the length of a Backbone collection in real-time as items are added or removed.
As someone new to StickIt, here's my current attempt:
export class SomeView extends marionette.CompositeView<backbone.Model, SomeItemView> {
(...)
bindings = {
"[data-bind-observer=count]": {
observe: ["collection.length"],
onGet: (collection) => {
return collection.length;
}
}
};
}