Constructor Summary
| Public Constructor | ||
| public |
Constructs the ComponentRegistry |
|
Member Summary
| Public Members | ||
| public |
components: * |
|
| public |
logger: * |
|
Method Summary
| Public Methods | ||
| public |
createInstanceOf(Component: Component, options: [object]): object Create an instance of a given component. |
|
| public |
getInstancesOf(Component: Component | String): Array Get instances of a specific component, by either it's string or Constructor |
|
| public |
Add a new Component to the registry. |
|
Public Constructors
Public Methods
public createInstanceOf(Component: Component, options: [object]): object source
Create an instance of a given component. Will also register the component.
Params:
| Name | Type | Attribute | Description |
| Component | Component | A constructor that extends |
|
| options | [object] | Options to pass to the constructor |
public getInstancesOf(Component: Component | String): Array source
Get instances of a specific component, by either it's string or Constructor
Example:
rizzo.renderComponent(MastheadComponent, {});
rizzo.registry.getInstancesOf(MastheadComponent); // [MastheadComponent]
public register(Constructor: Component) source
Add a new Component to the registry.
Must extend the Component constructor.
Components will only be registered in browsers that support Function.name since this is mostly for debugging anyways.
Params:
| Name | Type | Attribute | Description |
| Constructor | Component | The component being added |