* 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)
| 698 | * manipulation to insert it. |
| 699 | */ |
| 700 | function insertAnchorNode(hostLView: LView, hostTNode: TNode): RComment { |
| 701 | const renderer = hostLView[RENDERER]; |
| 702 | const commentNode = renderer.createComment(ngDevMode ? 'container' : ''); |
| 703 | |
| 704 | const hostNative = getNativeByTNode(hostTNode, hostLView)!; |
| 705 | const parentOfHostNative = renderer.parentNode(hostNative); |
| 706 | nativeInsertBefore( |
| 707 | renderer, |
| 708 | parentOfHostNative!, |
| 709 | commentNode, |
| 710 | renderer.nextSibling(hostNative), |
| 711 | false, |
| 712 | ); |
| 713 | return commentNode; |
| 714 | } |
| 715 | |
| 716 | let _locateOrCreateAnchorNode = createAnchorNode; |
| 717 | let _populateDehydratedViewsInLContainer: typeof populateDehydratedViewsInLContainerImpl = () => |
no test coverage detected