@@ -71,6 +71,7 @@ class BoundTranscludingComponentFactory implements BoundComponentFactory {
71
71
var childInjectorCompleter; // Used if the ViewFuture is available before the childInjector.
72
72
73
73
var component = _component;
74
+ final shadowRoot = new EmulatedShadowRoot (element);
74
75
var lightDom = new LightDom (element, scope)..pullNodes ();
75
76
76
77
final baseUrls = (_component.useNgBaseCss) ? baseCss.urls : [];
@@ -83,12 +84,12 @@ class BoundTranscludingComponentFactory implements BoundComponentFactory {
83
84
lightDom.clearComponentElement ();
84
85
if (childInjector != null ) {
85
86
lightDom.shadowDomView = viewFactory.call (childInjector.scope, childInjector);
86
- return element ;
87
+ return shadowRoot ;
87
88
} else {
88
89
childInjectorCompleter = new async .Completer ();
89
90
return childInjectorCompleter.future.then ((childInjector) {
90
91
lightDom.shadowDomView = viewFactory.call (childInjector.scope, childInjector);
91
- return element ;
92
+ return shadowRoot ;
92
93
});
93
94
}
94
95
});
@@ -103,7 +104,7 @@ class BoundTranscludingComponentFactory implements BoundComponentFactory {
103
104
Scope shadowScope = scope.createChild (new HashMap ());
104
105
105
106
childInjector = new ComponentDirectiveInjector (injector, this ._injector,
106
- eventHandler, shadowScope, templateLoader, new EmulatedShadowRoot (element) , lightDom, view);
107
+ eventHandler, shadowScope, templateLoader, shadowRoot , lightDom, view);
107
108
108
109
childInjector.bindByKey (_ref.typeKey, _ref.factory , _ref.paramKeys, _ref.annotation.visibility);
109
110
0 commit comments