You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`[${(this.elementRef.nativeElementasHTMLElement).tagName.toLowerCase()}] React wrapper components cannot have the '${attr.name}' attribute set. Use the following alternative: ${alternativeAttrName||''}`);
// Only allowing style if it's something that changes the display - setting anything else should be done on the child component directly (via the `styles` attribute in fabric for example)
Copy file name to clipboardExpand all lines: libs/core/src/renderer/registry.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,12 @@ export function registerElement(
12
12
resolver: ComponentResolver
13
13
): void{
14
14
if(elementMap.has(elementName)){
15
-
thrownewError(`Element for ${elementName} already registered.`);
15
+
// Ignore multiple register attempts for the same component.
16
+
// Angular doesn't allow sharing whole NgModule instances (in this case, an @NgModule for React-wrapped components) with lazy-loaded @NgModules (in the app),
17
+
// To keep the API simple, allow multiple calls to `registerElement`.
18
+
// Disadvantage is that you can't replace (React) component implementations at runtime. This sounds far-fetched, but solvable with a `static forRoot()` pattern for every
19
+
// React-wrapper components' @NgModule, ensuring that `registerElement` is only called once.
0 commit comments