KnockoutJS model set sqlite table
How can i have model in knockoutjs that gets its data from an sqlite table?.
// This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI
var viewModel = {
firstName: "Bert",
lastName: "Bertington"开发者_开发百科
};
//viewModel->settable('table_name'); for instance.
// Activates knockout.js
ko.applyBindings(viewModel);
I totally missed the knockoutjs mapping plugin here: http://knockoutjs.com/documentation/plugins-mapping.html
Solved the problem.
Checkout entityspaces.js, there's a video you can watch, it supports full hierarchcial data models and will even generate your WCF JSON service, it supports REST API's as well.
A Javascript ORM (Data Access) Framework that uses Knockout
https://github.com/EntitySpaces/entityspaces.js#readme
精彩评论