Class: Component

Component

new tart.ui.Component()

The component class useful for building small and single responsible UI components.

Extends

  • goog.events.EventTarget

Methods

protectedbindDomEvents()

Listens to DOM events. This method should be overriden by the implementer, and should keep the component's DOM event bindings.

protectedbindModelEvents()

Listens to the model's events. This method should be overriden by the implementer, and should keep the model's event listeners.

createElements()

Creates the necessary DOM elements and appends them to the root element. This method should be overriden by the implementer.

getElement(){Element}

Returns the dom element attached with the Component instance.

Returns:
Type Description
Element Returns the root DOM element.

templates_base(){string}

Template of the root element. This method can be overridden if necessary. Other templates should be named with the templates_ prefix as necessary.

Returns:
Type Description
string Root element's tempalte.