docs/vendor.js
function container(index, template, tagName, attrs, localRefs) {
    ngDevMode &&
        assertEqual(viewData[BINDING_INDEX], -1, 'container nodes should be created before any bindings');
    var currentParent = isParent ? previousOrParentNode : getParentLNode(previousOrParentNode);
    var lContainer = createLContainer(currentParent, viewData);
    var comment = renderer.createComment(ngDevMode ? 'container' : '');
    var node = createLNode(index, 0 /* Container */, comment, tagName || null, attrs || null, lContainer);
    appendChild(getParentLNode(node), comment, viewData);
    if (firstTemplatePass) {
        node.tNode.tViews = template ?
            createTView(-1, template, tView.directiveRegistry, tView.pipeRegistry, null) :
            [];
    }
    // Containers are added to the current view tree instead of their embedded views
    // because views can be removed and re-inserted.
    addToViewTree(viewData, index + HEADER_OFFSET, node.data);
    var queries = node.queries;
    if (queries) {
        // prepare place for matching nodes from views inserted into a given container
        lContainer[QUERIES] = queries.container();
    }
    createDirectivesAndLocals(localRefs);
    isParent = false;
    ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);
    queries && queries.addNode(node); // check if a given container node matches
    queueLifecycleHooks(node.tNode.flags, tView);
}
function container(index, template, tagName, attrs, localRefs) {
    ngDevMode &&
        assertEqual(viewData[BINDING_INDEX], -1, 'container nodes should be created before any bindings');
    var currentParent = isParent ? previousOrParentNode : getParentLNode(previousOrParentNode);
    var lContainer = createLContainer(currentParent, viewData);
    var comment = renderer.createComment(ngDevMode ? 'container' : '');
    var node = createLNode(index, 0 /* Container */, comment, tagName || null, attrs || null, lContainer);
    appendChild(getParentLNode(node), comment, viewData);
    if (firstTemplatePass) {
        node.tNode.tViews = template ?
            createTView(-1, template, tView.directiveRegistry, tView.pipeRegistry, null) :
            [];
    }
    // Containers are added to the current view tree instead of their embedded views
    // because views can be removed and re-inserted.
    addToViewTree(viewData, index + HEADER_OFFSET, node.data);
    var queries = node.queries;
    if (queries) {
        // prepare place for matching nodes from views inserted into a given container
        lContainer[QUERIES] = queries.container();
    }
    createDirectivesAndLocals(localRefs);
    isParent = false;
    ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);
    queries && queries.addNode(node); // check if a given container node matches
    queueLifecycleHooks(node.tNode.flags, tView);
}
function container ( index , template , tagName , attrs , localRefs ) { ngDevMode && assertEqual ( viewData [ BINDING_INDEX ] , - 1 , 'container nodes should be created before any bindings' ) ; var currentParent = isParent ? previousOrParentNode : getParentLNode ( previousOrParentNode ) ; var lContainer = createLContainer ( currentParent , viewData ) ; var comment = renderer . createComment ( ngDevMode ? 'container' : '' ) ; var node = createLNode ( index , 0 /* Container */ , comment , tagName || null , attrs || null , lContainer ) ; appendChild ( getParentLNode ( node ) , comment , viewData ) ; if ( firstTemplatePass ) { node . tNode . tViews = template ? createTView ( - 1 , template , tView . directiveRegistry , tView . pipeRegistry , null ) : [ ] ; } // Containers are added to the current view tree instead of their embedded views // because views can be removed and re-inserted. addToViewTree ( viewData , index + HEADER_OFFSET , node . data ) ; var queries = node . queries ; if ( queries ) { // prepare place for matching nodes from views inserted into a given container lContainer [ QUERIES ] = queries . container ( ) ; } createDirectivesAndLocals ( localRefs ) ; isParent = false ; ngDevMode && assertNodeType ( previousOrParentNode , 0 /* Container */ ) ; queries && queries . addNode ( node ) ; // check if a given container node matches queueLifecycleHooks ( node . tNode . flags , tView ) ; }
Creates an LContainerNode.

Only `LViewNodes` can go into `LContainerNodes`.

@param index The index of the container in the data array
@param template Optional inline template
@param tagName The name of the container element, if applicable
@param attrs The attrs attached to the container, if applicable
@param localRefs A set of local reference bindings on the element.
Creates an LContainerNode .