refactor(ivy): merged containerStart/containerEnd (#21374)

This separation is no longer needed since directives are now passed into the `container` as an array rather than as child functions of the `containerStart`

PR Close #21374
This commit is contained in:
Miško Hevery
2018-01-09 13:32:24 -08:00
committed by Alex Eagle
parent 9f43f5f09e
commit 16232f000f
16 changed files with 15 additions and 91 deletions

View File

@ -18,7 +18,6 @@ export {
V as ɵV,
b as ɵb,
b1 as ɵb1,
c as ɵc,
cR as ɵcR,
cr as ɵcr,
e as ɵe,

View File

@ -39,8 +39,7 @@ export {
componentRefresh as r,
containerStart as C,
containerEnd as c,
container as C,
containerRefreshStart as cR,
containerRefreshEnd as cr,

View File

@ -1107,7 +1107,7 @@ export function executeViewHooks(): void {
* @param attrs The attrs attached to the container, if applicable
* @param localRefs A set of local reference bindings on the element.
*/
export function containerStart(
export function container(
index: number, directiveTypes?: DirectiveType<any>[], template?: ComponentTemplate<any>,
tagName?: string, attrs?: string[], localRefs?: string[] | null): void {
ngDevMode && assertEqual(currentView.bindingStartIndex, null, 'bindingStartIndex');
@ -1145,15 +1145,8 @@ export function containerStart(
// because views can be removed and re-inserted.
addToViewTree(node.data);
hack_declareDirectives(index, directiveTypes, localRefs);
}
export function containerEnd() {
if (isParent) {
isParent = false;
} else {
ngDevMode && assertHasParent();
previousOrParentNode = previousOrParentNode.parent !;
}
isParent = false;
ngDevMode && assertNodeType(previousOrParentNode, LNodeFlags.Container);
const query = previousOrParentNode.query;
query && query.addNode(previousOrParentNode);