scttnlsn / backbone.io

Backbone.js sync via Socket.IO

Home Page:http://scttnlsn.github.io/backbone.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set channel after collection initialization?

factormystic opened this issue · comments

I have a backbone collection defined similar to the example in the readme, with the backend set declaratively. However I want to set the channel later after object initialization, which I tried with this.backend.channel = <channel id>. I can confirm that this is set correctly in the client backend object. But on the server, in the req object's channel is null.

Is there any way to set the channel at runtime?

There's currently no mechanism to do this. There are a lot of leaky abstractions like this that I would love to address in a new version completely reworked from the ground up.

scttnlsn/data.io might address this.