-
-
Notifications
You must be signed in to change notification settings - Fork 5
ComponentFactory
The component factory registers the components, which in turn triggers the bootstrap process of the individuell components. Once a component has been registered using the factory, the DOM is searched for matching elements to create individuell components.
A brief list of all class members with purposes.
Registers the passed components (the class must be passed, not the object of a component!) Within the optionally passed element.
public static onComponentClassInitialized(callback: (componentObject?: AbstractComponent) => void, individualComponent: AbstractComponent): void
You can register a listener, which gets called if the passed component gets initialized. Normally used by Decorators to add features to components. For more details take a look at a working decorator like the EventListener decorator.
public static createComponentWithElement(element: HTMLElement, componentClass: AbstractComponent): AbstractComponent
This method skips the process of finding an element for the component using the selector. instead, it simply uses the element that is passed as first argument. Useful if elements are generated dynamically, and functionalities should be placed on these elements before they are in the DOM.
- Classes
- Decorators
- CustomEvents
- Helpers
- Interfaces
- Polyfills