flightjs/flight — pull request #306 by danwrong (2014-08-29 14:00:13+00:00)
Title: Dynamic attribute setters

Default or given attributes can be a function that gets evaluated at initialize time in the context of the component for dynamic attr setting.

````javascript
this.attributes({
href: function() {
return this.$node.attr('href');
}
});
````

but you can also do it at attach time:

````javascript
Tweet.attachTo('.tweet', {
tweetId: function() { return this.$node.data('tweet-id') }
});
````

SICK!