earpjs
v0.0.2
Published
Layout manager for Titanium based on Handlebars
Readme
earp.js
earp.js is view engine for Titanium
Philosophy
With earp.js you will describe your views in XML and Handlebars syntaxes.
It's based on :
- Titanium API
- Handlebars
Getting started
1. Add earp.js in your Resources folder
2. Create a hello.earp file in your Resources folder and copy/paste this :
<window backgroundColor="white">
<label top= "20%" left="50%" text="{{text}}" />
<button top= "50%" left="50%" id="foobar" title="click here !" />
</window>3. Fill your app.js with this :
var Earp = require('earp');
var dialog = Earp.build('hello', {text: 'Hello World !'});
dialog.get('foobar').addEventListener('click', function() {
alert('Button clicked');
});
dialog.open();