2015-06-28から1日間の記事一覧
writeプロパティにfunctionを渡すと変更時の処理を書ける。以下の例はpureComputedだけどcomputedも同様。 this.fullName = ko.pureComputed({ read: function () { return this.firstName() + " " + this.lastName(); }, write: function (value) { var las…
writeプロパティにfunctionを渡すと変更時の処理を書ける。以下の例はpureComputedだけどcomputedも同様。 this.fullName = ko.pureComputed({ read: function () { return this.firstName() + " " + this.lastName(); }, write: function (value) { var las…