A lightweight and very simple (but powerful) client side javascript MVC framework.
##Examples
Consider the html:
<a href="#!/hello/world">Hello world!</a> |
<a href="#!/hello/me/MyName">Hello me (put your name on the url)</a>
- With simple actions:
var app = new nzila.App();
app.route("hello/world/", function() {
alert("Hello world!");
});
app.route("hello/me/:name", function(name) {
alert("Hello " + name + "!");
});
app.start();
- With controller:
function Hello() {
}
Hello.prototype = {
world: function() {
alert("Hello world!");
},
me: function(name) {
alert("Hello " + name + "!");
}
};
var app = new nzila.App();
app.route("hello", nzila.Controller(Hello));
app.start();