@angular/core 14.0.0-next.5 → 14.0.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2020/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.5
2
+ * @license Angular v14.0.0-next.6
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7615,7 +7615,8 @@ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
7615
7615
  renderer.insertBefore(parent, child, beforeNode, isMove);
7616
7616
  }
7617
7617
  else {
7618
- parent.insertBefore(child, beforeNode, isMove);
7618
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7619
+ targetParent.insertBefore(child, beforeNode, isMove);
7619
7620
  }
7620
7621
  }
7621
7622
  function nativeAppendChild(renderer, parent, child) {
@@ -7625,7 +7626,8 @@ function nativeAppendChild(renderer, parent, child) {
7625
7626
  renderer.appendChild(parent, child);
7626
7627
  }
7627
7628
  else {
7628
- parent.appendChild(child);
7629
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7630
+ targetParent.appendChild(child);
7629
7631
  }
7630
7632
  }
7631
7633
  function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
@@ -7645,6 +7647,10 @@ function nativeRemoveChild(renderer, parent, child, isHostElement) {
7645
7647
  parent.removeChild(child);
7646
7648
  }
7647
7649
  }
7650
+ /** Checks if an element is a `<template>` node. */
7651
+ function isTemplateNode(node) {
7652
+ return node.tagName === 'TEMPLATE' && node.content !== undefined;
7653
+ }
7648
7654
  /**
7649
7655
  * Returns a native parent of a given native node.
7650
7656
  */
@@ -21280,7 +21286,7 @@ class Version {
21280
21286
  /**
21281
21287
  * @publicApi
21282
21288
  */
21283
- const VERSION = new Version('14.0.0-next.5');
21289
+ const VERSION = new Version('14.0.0-next.6');
21284
21290
 
21285
21291
  /**
21286
21292
  * @license