Slide 14
Slide 14 text
function inbox() {
this.attributes({ myProp: 'hi' })
this.doSomething = function () {
this.trigger(document, 'uiDoingSomething')
/* ... */
}
// after initializing the component
this.after('initialize', function () {
this.on('click', this.doSomething)
})
}
var Inbox = flight.component(inbox)
/* Attach the component to a DOM node */
Inbox.attachTo('#inbox', { myProp: 'hello' })
Flight.js A component-based, event-driven JavaScript framework
@giuseppegurgone