これはあなたのバージョンです:
function StudentViewModel() {
var self = this;
this.students = ko.observableArray([]);
this.detailedStudent = ko.observable();
this.clickMe = function(student) {
alert(student.IncludeInStudentSiteResults());
self.detailedStudent(student);
alert(student.IncludeInStudentSiteResults());
}
}
私のバージョンを使用してみてください:
function StudentViewModel() {
var self = this;
this.students = ko.observableArray([]);
this.detailedStudent = ko.observable();
this.clickMe = function(student) {
alert(student.IncludeInStudentSiteResults());
self.detailedStudent(ko.observable(student));
alert(student.IncludeInStudentSiteResults());
}
}
JSfiddle: http: //jsfiddle.net/62fDB/23/