惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
Jina AI
Jina AI
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
V
V2EX
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
B
Blog
博客园 - 叶小钗
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
A
About on SuperTechFans
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog

Backbone.js

渣渣想请教下有关backbone的一点入门理解问题 关于BackboneJS中extend实现的理解 Backbone.js的兼容性怎么样?ie6能支持吗 有用过Backbone的吗,backbone在不同路由跳转的时候可以从服务器取模板吗?还是说要所有的模板都要取回来? js模板过于集中的问题 请问国内有什么关于Backbone.js的社区么?
backbone.js的例子问题
ljbha007 · 2012-12-28 · via Backbone.js

最近在学习backbone.js
看到第一个例子就有看不懂的地方
http://arturadib.com/hello-backbonejs/docs/1.html
(function($){
var ListView = Backbone.View.extend({
...
initialize: function(){
_.bindAll(this, 'render'); // fixes loss of context for 'this' within methods
this.render(); // not all views are self-rendering. This one is.
},
...
});
...
})(jQuery);
请问:
Q1: 为什么用 (function($){})(jQuery);而不用 (function(){})();?
Q2: _.bindAll(this, 'render') 是干啥的? 为什么可以“fixes loss of context for 'this' within methods”?
麻烦懂的解答一下 感激不尽