Example of change tracking behavior after applying complex object detection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var viewModel = { | |
Name: ko.observable("Pete"), | |
Age: ko.observable(29), | |
Skills: { | |
Tdd: ko.observable(true), | |
Knockout: ko.observable(true), | |
ChangeTracking: ko.observable(false), | |
}, | |
Occupation: ko.observable("Developer") | |
}; | |
applyChangeTracking(viewModel); | |
viewModel.Skills().ChangeTracking(true); | |
getChangesFromModel(viewModel); | |
/* -> { | |
"Skills": { | |
Tdd: function observable() { .... }, | |
Knockout: function observable() { .... }, | |
ChangeTracking: function observable() { .... }, | |
} | |
} */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment