0.0.4 • Published 12 years ago
tower-directive-expression v0.0.4
Directive Expression Compiler
Installation
node.js:
npm install tower-directive-expressionbrowser:
component install tower/directive-expressionExample
var compile = require('tower-directive-expression');
var exp = compile('data-text', 'post[attr.name]');
console.log(exp.edges); // attribute chains to watchWatching content for changes.
var content = require('tower-content');
var scope = content('page').init({ title: 'foo' });
var el = document.querySelector('#title');
exp.watch(scope, function(){
el.textContent = exp.fn(scope);
});Licence
MIT