From 70bc485755e4bc65c27c2fa8998618cb780ac931 Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Wed, 29 Jul 2015 16:02:14 +0200 Subject: [PATCH] fix(browser_adapter): fix clearNodes() in IE Fixes #3295 Closes #3355 --- modules/angular2/src/dom/browser_adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/dom/browser_adapter.ts b/modules/angular2/src/dom/browser_adapter.ts index a20a64f081..c62cb4162e 100644 --- a/modules/angular2/src/dom/browser_adapter.ts +++ b/modules/angular2/src/dom/browser_adapter.ts @@ -130,14 +130,14 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter { } clearNodes(el) { while (el.firstChild) { - el.firstChild.remove(); + el.removeChild(el.firstChild); } } appendChild(el, node) { el.appendChild(node); } removeChild(el, node) { el.removeChild(node); } replaceChild(el: Node, newChild, oldChild) { el.replaceChild(newChild, oldChild); } remove(node): Node { - node.remove(); + node.parentNode.removeChild(node); return node; } insertBefore(el, node) { el.parentNode.insertBefore(node, el); }