2.3.0 • Published 7 years ago

@gitterhq/backbone-proxy-collection v2.3.0

Weekly downloads
10
License
MIT
Repository
-
Last release
7 years ago

Backbone.Collection Proxy

A simple utility to help switching out collections whilst allowing their respective views to function normally.

Examples:

//Make a new collection
var privateCollection = new Backbone.Collection();
var publicCollection  = new ProxyCollection({
  collection: privateCollection
});

Now at any point if you want to switch the collection call:

var newCollection = new Backbone.Collection();
publicCollection.switchCollection(newCollection);

This will maintain you event bindings etc. Simples.