6 ms·
Thanks for the great example. I'm already using Backbone.js in a project, it's a beautiful piece of code (along with underscore.js). One small thing, wouldn't i
by eloop 16y ago
Thanks for the great example. I'm already using Backbone.js in a project, it's a beautiful piece of code (along with underscore.js). One small thing, wouldn't it be better to create a new application specific namespace instead of adding so many globals ?
- jashkenas 16y agoYes -- a single hidden namespace would be cleaner, but then you miss out on all the fun of playing around with this stuff in the console! Here's some one-liners to try with a full Todo list: Todos.pluck("content"); Todos.first().toggle(); Todos.last().clear();