17 December, 2011

Error: ko.mapping.updateFromJS, use ko.mapping.fromJS instead

I had the same issue, (Error: ko.mapping.updateFromJS, use ko.mapping.fromJS instead) I bugged for long time, then i tried the another alternative.fromJS

 the functionality is the same, but be aware that updateFromJS's parameter list is just the other away around, so instead of doing:
   ko.mapping.updateFromJS(viewModel, jsData);

You need to replace this with:
   ko.mapping.fromJS(jsData, {}, viewModel);

0 comments:

Post a Comment