parent
329b2eda66
commit
b1fc3e87c6
|
@ -308,7 +308,7 @@ export class ProtoView {
|
|||
}
|
||||
|
||||
_instantiate(hostElementInjector: ElementInjector, eventManager: EventManager): View {
|
||||
var rootElementClone = this.instantiateInPlace ? this.element : DOM.clone(this.element);
|
||||
var rootElementClone = this.instantiateInPlace ? this.element : DOM.importIntoDoc(this.element);
|
||||
var elementsWithBindingsDynamic;
|
||||
if (this.isTemplateElement) {
|
||||
elementsWithBindingsDynamic = DOM.querySelectorAll(DOM.content(rootElementClone), NG_BINDING_CLASS_SELECTOR);
|
||||
|
|
|
@ -187,6 +187,9 @@ class DOM {
|
|||
node.nodeType == Node.TEXT_NODE;
|
||||
static bool isElementNode(Node node) =>
|
||||
node.nodeType == Node.ELEMENT_NODE;
|
||||
static Node importIntoDoc(Node node) {
|
||||
return document.importNode(node, true);
|
||||
}
|
||||
}
|
||||
|
||||
class CSSRuleWrapper {
|
||||
|
|
|
@ -219,6 +219,9 @@ export class DOM {
|
|||
static isElementNode(node:Node):boolean {
|
||||
return node.nodeType === Node.ELEMENT_NODE;
|
||||
}
|
||||
static importIntoDoc(node:Node) {
|
||||
return document.importNode(node, true);
|
||||
}
|
||||
}
|
||||
|
||||
export class CSSRuleWrapper {
|
||||
|
|
Loading…
Reference in New Issue