我从它的官方网站学习淘汰赛,这里是我从网站采取的教程为什么我们通过“这”在ko.computed
// This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI
function AppViewModel() {
this.firstName = ko.observable('');
this.lastName = ko.observable("Bertington");
this.fullName = ko.computed(function() {
return this.firstName() + " " + this.lastName();
}, this);
}
// Activates knockout.js
ko.applyBindings(new AppViewModel());
我要问,什么是这个传递的目的作为参数来计算功能
ko.computed(function() {
return this.firstName() + " " + this.lastName();
}, this);
感谢
您是否阅读过**在http://knockoutjs.com/documentation/computedObservables.html管理“this”**部分?有些事情还不清楚? – nemesv