JavaScript开发框架 Sammy.js
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: http://sammyjs.org/
- 软件文档: http://sammyjs.org/docs
- 官方下载: http://sammyjs.org/download
软件介绍
Sammy.js 是一个微型的 JavaScript 框架用来简化 JavaScript 应用程序的编写,其核心只有 16K,压缩后 5.2K 大小。
示例代码:
// initialize the application
var app = Sammy('#main', function() {
// include a plugin
this.use('Mustache');
// define a 'route'
this.get('#/', function() {
// load some data
this.load('posts.json')
// render a template
.renderEach('post.mustache')
// swap the DOM with the new content
.swap();
});
});
// start the application
app.run('#/');
