Skip to content Skip to sidebar Skip to footer

Extending Dynamic And Mapped Data In Knockout

Using Knockout.JS, I'm trying to determine how to best extend objects in the view model when they will be both loaded via the mapping plugin and dynamically added. In this example,

Solution 1:

Take a look at this answer, especially the live example on JSFiddle.

It looks like your code is close to what it needs to be.

I think you just need to fold mapping and ko.mapping.fromJS into your Person constructor.

Post a Comment for "Extending Dynamic And Mapped Data In Knockout"