knockout.mapping icon indicating copy to clipboard operation
knockout.mapping copied to clipboard

Consider amending docs re: populating an array

Open SteveSanderson opened this issue 14 years ago • 2 comments

Hope you don't mind me moving this here, but there was an issue reported in KO core about this aspect of the mapping docs. Please handle or close it however you see fit.

Details at https://github.com/SteveSanderson/knockout/issues/297

SteveSanderson avatar Jan 30 '12 23:01 SteveSanderson

Thanks for moving this. I'm hopefully able to look at this soon.

sagacity avatar Jan 31 '12 11:01 sagacity

Yeah, this is super confusing, I start off seeing ko.mapping.fromJS with just 1 argument, then 2, then suddenly 3 and in one 2 argument example the second argument is the object you're mapping to (after previously mapping) and in another the second argument is a mapping object with options for how to perform the mapping.

My head is spinning, and I'm just brute forcing a solution over here since every external example I see using ko.mapping.fromJS in a different way. I can't seem to find any clearcut documentation on what each argument is supposed to be in different instances

Gooseus avatar Mar 20 '12 20:03 Gooseus