* Creates and inserts a comment node that acts as an anchor for a view container. * * If the host is a regular element, we have to insert a comment node manually which will * be used as an anchor when inserting elements. In this specific case we use low-level DOM * manipulation to insert it.
(hostLView: LView, hostTNode: TNode)
| 675 | * manipulation to insert it. |
| 676 | */ |
| 677 | function insertAnchorNode(hostLView: LView, hostTNode: TNode): RComment { |
| 678 | const renderer = hostLView[RENDERER]; |
| 679 | const commentNode = renderer.createComment(ngDevMode ? 'container' : ''); |
| 680 | |
| 681 | const hostNative = getNativeByTNode(hostTNode, hostLView)!; |
| 682 | const parentOfHostNative = renderer.parentNode(hostNative); |
| 683 | nativeInsertBefore( |
| 684 | renderer, |
| 685 | parentOfHostNative!, |
| 686 | commentNode, |
| 687 | renderer.nextSibling(hostNative), |
| 688 | false, |
| 689 | ); |
| 690 | return commentNode; |
| 691 | } |
| 692 | |
| 693 | let _locateOrCreateAnchorNode = createAnchorNode; |
| 694 | let _populateDehydratedViewsInLContainer: typeof populateDehydratedViewsInLContainerImpl = () => |
no test coverage detected
searching dependent graphs…