Skip to content

@cmilfont /compiled.js
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
var engine = new Eljs({
, helpers: {
strong: function(value){/*...*/}
}
});
engine.compile("<div>${user.address.length > 0} - ${strong(user.name)}</div>")
engine.parse(json);
var engine = new Eljs({
template: "<div>${user.address.length > 0} - ${strong(user.name)}</div>"
, json : {
"user": {
name: "Christiano Milfont",
address: [{
country: "Brazil"
}]
}
}
, helpers: {
strong: function(value){return "<b>${value}</b>".interpolate({value:value})}
}
});
engine.parse()
var engine;
$.get("template.html", function(markup){
engine = new Eljs({
helpers: {
strong: function(value){/*...*/}
}
});
engine.compile(markup);
})
//...
engine.parse(json);
var engine;
$.get("template.html", function(markup){
engine = new Eljs({
template: markup,
helpers: {
strong: function(value){/*...*/}
}
});
})
//...
engine.parse(json);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.