JavaScript MVC 框架 Ity
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/dcocchia/Ity
- 软件文档: https://github.com/dcocchia/Ity
软件介绍
Ity 是一个小型的无依赖的 JavaScript MVC 框架。
示例代码:
var myApp = new Ity.Application();
var myModel = new Ity.Model();
var myView = new Ity.View({
el: '.someElement',
app: myApp,
model: myModel,
events: {
".btn" : {
"click": "onBtnClick",
"hover": "onBtnHover"
},
".fancyBtn" : {
"click": "onFancyBtnClick",
"focus": "onFancyBtnFocus"
}
},
initialize: function(options) {
this.model.on("change", this.render, this);
},
render: function() {
this.select(".myContainer").html(this.model.get("someData"));
},
onBtnClick: function(evt) {
var output = this.select("#difWithId").find(".output");
output.html("<div><p>Click!</p></div>")
}
//... more click, hover, focus events from events hash
});
Learning Vue.js 2
Olga Filipova / Packt Publishing / 2017-1-5 / USD 41.99
About This Book Learn how to propagate DOM changes across the website without writing extensive jQuery callbacks code.Learn how to achieve reactivity and easily compose views with Vue.js and unders......一起来看看 《Learning Vue.js 2》 这本书的介绍吧!
