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
* Register an element to be renderer when the renderer sees the tag.
13
+
* @param elementName the tag
14
+
* @param resolver A resolver to the React component
15
+
*/
10
16
exportfunctionregisterElement(
11
17
elementName: string,
12
18
resolver: ComponentResolver
13
19
): void{
14
20
if(elementMap.has(elementName)){
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.
21
+
// Ignore multiple register attempts for the same component.
22
+
// Angular doesn't allow sharing whole NgModule instances (in this case, an @NgModule for React-wrapped components) with lazy-loaded @NgModules (in the app),
23
+
// To keep the API simple, allow multiple calls to `registerElement`.
24
+
// 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
25
+
// React-wrapper components' @NgModule, ensuring that `registerElement` is only called once.
0 commit comments