ukulelejs

1.6.3 • Public • Published

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>

Find more examples and API document at https://momoko8443.github.io/ukulelejs_website/

Then, enjoy it!

Package Sidebar

Install

npm i ukulelejs

Weekly Downloads

2

Version

1.6.3

License

ISC

Unpacked Size

524 kB

Total Files

70

Last publish

Collaborators

  • momoko8443