Component

Component class

Signature:

export class Component 

Methods

MethodModifiersDescription
addChild(component)Adds a child component, loading it if this component is loaded
load()Load this component and its children
onload()Override this to load your component
onunload()Override this to unload your component
register(cb)Registers a callback to be called when unloading
registerDomEvent(el, type, callback, options)Registers an DOM event to be detached when unloading
registerDomEvent(el, type, callback, options)Registers an DOM event to be detached when unloading
registerDomEvent(el, type, callback, options)Registers an DOM event to be detached when unloading
registerEvent(eventRef)Registers an event to be detached when unloading
registerInterval(id)Registers an interval (from setInterval) to be cancelled when unloading Use instead of to avoid TypeScript confusing between NodeJS vs Browser API
removeChild(component)Removes a child component, unloading it
unload()Unload this component and its children