* @static unregisterComponent - Removes a component from the components list. * Any component you want to remove should be removed before calling the * init () method so that their Mounting cycle is not executed. * * @param {string} component - ID of the Component to unregister. Remembe
(component: string)
| 935 | * each component must have an unique ID. |
| 936 | */ |
| 937 | static unregisterComponent (component: string) { |
| 938 | if (!this.global ('_didSetup')) { |
| 939 | this._components = this.components ().filter ((c) => c.tag.toLowerCase() !== component.toLowerCase()); |
| 940 | } else { |
| 941 | FancyError.show ('engine:component:unregister_after_setup', { |
| 942 | component: component |
| 943 | }); |
| 944 | } |
| 945 | } |
| 946 | |
| 947 | /** |
| 948 | * @static components - Returns the list of registered Components. |
no test coverage detected