I have a view model
function ViewModel() {
this.applications = ko.observable(10);
this.applicationsText_computed = ko.computed(function () {
return "You have " + this.applications() + " applications";
});
this.applicationsText_classinc = function () {
return "You have " + this.applications() + " applications";
};
};
var viewModel = new ViewModel();
ko.applyBindings(viewModel);
<p data-bind="text: applicationsText_computed()"></p>
<p data-bind="text: applicationsText_classic()"></p>
Both paragraphs changes the text when i change applications observable.
Then, what is the difference between using a ko.computed and a classinc function?