JSViews

https://github.com/BorisMoore/jsviews

例子

http://www.jsviews.com/#samples

http://www.jsviews.com/#jsvplaying

<!DOCTYPE html>
<!-- To run the current sample code in your own environment, copy this to an html page. --> <html>
<head>
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<base href="//www.jsviews.com/samples/" />
<script src="../download/jsviews.min.js"></script>
<link href="samples.css" rel="stylesheet" />
</head>
<body> <table><tbody id="peopleList"></tbody></table> <script id="peopleTmpl" type="text/x-jsrender">
<tr><td>
<button id="addBtn">Add</button>
</td></tr>
{^{for people}}
<tr><td>
{{:name}}
</td></tr>
{{/for}}
</script> <script>
var myTemplate = $.templates("#peopleTmpl"); var people = [
{
name: "Adriana"
},
{
name: "Robert"
}
]; var app = {
people: people
}; myTemplate.link("#peopleList", app); $("#addBtn").on("click", function() {
$.observable(people).insert({name: "name"});
});
</script> </body>
</html>

JSViews API

http://www.jsviews.com/#jsvapi

Topics:
 

评价

http://blchen.com/jsviews-javascript-mvvm-framework/

https://stackoverflow.com/questions/tagged/jsviews (每个问题回答者,只有1或者2个,说明应用不广泛)

05-06 01:00