Backbone js .listenTo vs .on
以下2行代码有哪些优缺点?我不明白为什么有两种不同的方法来做同样的事情。
this.listenTo(app.Todos, 'change:completed', this.filterOne);app.Todos.on('change:completed', this.filterOne);
另外,在使用.on时,如何确定是否为默认上下文?
相关分类