Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit b04eb61

Browse files
committed
fix(component factory): Only create a single ShadowDomComponentFactory
1 parent a53f33d commit b04eb61

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/core_dom/module_internal.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CoreDomModule extends Module {
6161
bind(Compiler, toImplementation: TaggingCompiler);
6262
bind(CompilerConfig);
6363

64-
bind(ComponentFactory, toImplementation: ShadowDomComponentFactory);
64+
bind(ComponentFactory, toFactory: (i) => i.getByKey(SHADOW_DOM_COMPONENT_FACTORY_KEY));
6565
bind(ShadowDomComponentFactory);
6666
bind(TranscludingComponentFactory);
6767
bind(Content);

lib/core_dom/static_keys.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Key NG_ELEMENT_KEY = new Key(NgElement);
2323
Key NODE_ATTRS_KEY = new Key(NodeAttrs);
2424
Key NODE_KEY = new Key(dom.Node);
2525
Key NODE_TREE_SANITIZER_KEY = new Key(dom.NodeTreeSanitizer);
26+
Key SHADOW_DOM_COMPONENT_FACTORY_KEY = new Key(ShadowDomComponentFactory);
2627
Key SHADOW_ROOT_KEY = new Key(dom.ShadowRoot);
2728
Key TEMPLATE_CACHE_KEY = new Key(TemplateCache);
2829
Key TEMPLATE_LOADER_KEY = new Key(TemplateLoader);

0 commit comments

Comments
 (0)