@gitterhq/backbone-proxy-collection

2.3.0 • Public • Published

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.

/@gitterhq/backbone-proxy-collection/

    Package Sidebar

    Install

    npm i @gitterhq/backbone-proxy-collection

    Weekly Downloads

    8

    Version

    2.3.0

    License

    MIT

    Last publish

    Collaborators

    • gitterhq-admin
    • suprememoocow
    • mlm
    • andrewnewdigate