AyKarsi
AyKarsi

Reputation: 9675

Asp.net MVC 4 API and Knockout.js: Generate Knockout.js models

I'd like to have my knockout.js classes generated from my AspNet API controller and model classes.

I've googled quite a bit, but it looks as if I'll have to build it myself.

Any pointers to existing tools/code that will make this easier are appreciated!

Upvotes: 8

Views: 7213

Answers (1)

jaffa
jaffa

Reputation: 27350

Look at using Knockout.mapping. This converts the json received from your controller automatically into view models complete with observables.

Upvotes: 14

Related Questions