ukulelejs
v1.6.3
Published
this is a light mvvc framework likes angularjs
Downloads
15
Maintainers
Readme
Install UkuleleJS
bower install ukulelejs
or
npm install ukulelejs
Getting Start
Native Way
Import ukulelejs's library
<head>
...
<script type="text/javascript" src="ukulelejs/dist/uku.js"></script>
...
</head>
Add 'uku-application' as an attribute to any html tags, then ukulelejs will control whole this tag
<body uku-application>
...
</body>
Initialize ukulelejs and register Controller in the $(document).ready's callback function
...
</body>
<script>
...
var uku = new Ukulele();
uku.registerController("$myCtrl", new MyController());
uku.init();
function MyController() {
this.message = "";
....
}
</script>
Bind any html attribute to your model, just add 'uku-' + attribute's name, using {{}} to show model's value
<body uku-application>
...
<input type="text" uku-value="myCtrl.message">
<h3>{{myCtrl.message}}</h3>
...
</body>