Answers for "how to bind a json output result to any new model"

0

how to bind a json output result to any new model

var viewModel = {
    firstName : ko.observable("Bert"),
    lastName : ko.observable("Smith"),
    pets : ko.observableArray(["Cat", "Dog", "Fish"]),
    type : "Customer"
};
viewModel.hasALotOfPets = ko.computed(function() {
    return this.pets().length > 2
}, viewModel)
Posted by: Guest on February-10-2021

Code answers related to "how to bind a json output result to any new model"

Code answers related to "Javascript"

Browse Popular Code Answers by Language