I'm trying to understand below code :
var MyModel = function (folders) {
var thisType = this;
this.callType = ko.computed({
read: function () {
return "openLink";
},
owner: this
});
Why set 'thisType' to 'this' ?
Reading the doc at http://knockoutjs.com/documentation/computedObservables.html
"Managing ‘this’ In case you’re wondering what the second parameter to ko.computed is (the bit where we passed this in the preceding code), that defines the value of this when evaluating the computed observable. Without passing it in, it would not have been possible to refer to this.firstName() or this.lastName(). Experienced JavaScript coders will regard this as obvious, but if you’re still getting to know JavaScript it might seem strange. (Languages like C# and Java never expect the programmer to set a value for this, but JavaScript does, because its functions themselves aren’t part of any object by default.)"
Is 'this' the page object ?