rstankov / backbone-bind-to Goto Github PK
View Code? Open in Web Editor NEWBackbone.js extension for automatic binding and unbinding of model events to views.
License: Other
Backbone.js extension for automatic binding and unbinding of model events to views.
License: Other
Hi Stankov :)
See this https://github.com/RStankov/backbone-bind-to/blob/master/src/backbone_bind_to.coffee#L21
Looks like when I call bindTo more than once like:
this.bindTo(this.model.myCollection, "reset", "render");
this.bindTo(this.model.myOtherCollection, "reset", "render");
it will clean up all the _binded values, please correct me if I'm wrong.
Also I've used your library but with little modifications as they were naturally useful in my own case, you can take a look on the raw javascript (sorry, didn't had enough time to get them back to coffee) at this link:
https://gist.github.com/4215860
in general:
window
context, as I'm using browserify for asset pipelines which includes every single file in its own CommonJS-like scope.Hope that helps. Your plugin works quite well, now we have no leaks or strange side effects. Credits to follow ;)
Great work - Thanks for making this available! One small detail... the comments say "Backbone Handlebars" instead of "Backbone BindTo". Didn't seem worth forking, but worth mentioning.
Cheers,
Chip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.