* 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)
| 721 | * manipulation to insert it. |
| 722 | */ |
| 723 | function insertAnchorNode(hostLView: LView, hostTNode: TNode): RComment { |
| 724 | const renderer = hostLView[RENDERER]; |
| 725 | const commentNode = renderer.createComment(ngDevMode ? 'container' : ''); |
| 726 | |
| 727 | const hostNative = getNativeByTNode(hostTNode, hostLView)!; |
| 728 | const parentOfHostNative = renderer.parentNode(hostNative); |
| 729 | nativeInsertBefore( |
| 730 | renderer, |
| 731 | parentOfHostNative!, |
| 732 | commentNode, |
| 733 | renderer.nextSibling(hostNative), |
| 734 | false, |
| 735 | ); |
| 736 | return commentNode; |
| 737 | } |
| 738 | |
| 739 | let _locateOrCreateAnchorNode = createAnchorNode; |
| 740 | let _populateDehydratedViewsInLContainer: typeof populateDehydratedViewsInLContainerImpl = () => |
no test coverage detected