earp.js is view engine for Titanium
With earp.js you will describe your views in XML and Handlebars syntaxes.
It's based on :
- Titanium API
- Handlebars
<window backgroundColor="white">
<label top= "20%" left="50%" text="{{text}}" />
<button top= "50%" left="50%" id="foobar" title="click here !" />
</window>
var Earp = require('earp');
var dialog = Earp.build('hello', {text: 'Hello World !'});
dialog.get('foobar').addEventListener('click', function() {
alert('Button clicked');
});
dialog.open();