scttnlsn / backbone.io

Backbone.js sync via Socket.IO
http://scttnlsn.github.io/backbone.io
541 stars 66 forks source link

How to set channel after collection initialization? #33

Closed factormystic closed 11 years ago

factormystic commented 11 years ago

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?

scttnlsn commented 11 years ago

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 commented 11 years ago

scttnlsn/data.io might address this.