diff --git a/packages/core/src/render3/component_ref.ts b/packages/core/src/render3/component_ref.ts index 454f1a239e19..dac2e1c2af18 100644 --- a/packages/core/src/render3/component_ref.ts +++ b/packages/core/src/render3/component_ref.ts @@ -28,22 +28,25 @@ import {createElementRef, ElementRef} from '../linker/element_ref'; import {NgModuleRef} from '../linker/ng_module_factory'; import {RendererFactory2} from '../render/api'; import {Sanitizer} from '../sanitization/sanitizer'; -import {assertDefined} from '../util/assert'; +import {assertDefined, assertGreaterThan, assertIndexInRange} from '../util/assert'; import {assertComponentType, assertNoDuplicateDirectives} from './assert'; import {attachPatchData} from './context_discovery'; import {getComponentDef} from './def_getters'; import {depsTracker} from './deps_tracker/deps_tracker'; -import {NodeInjector} from './di'; +import {getNodeInjectable, NodeInjector} from './di'; import {registerPostOrderHooks} from './hooks'; import {reportUnknownPropertyError} from './instructions/element_validation'; import {markViewDirty} from './instructions/mark_view_dirty'; import {renderView} from './instructions/render'; import { - createDirectivesInstances, + addToEndOfViewTree, createLView, createTView, + getInitialLViewFlagsFromDef, + getOrCreateComponentTView, initializeDirectives, + invokeDirectivesHostBindings, locateHostElement, markAsComponentHost, setInputsForProperty, @@ -59,10 +62,11 @@ import { TNode, TNodeType, } from './interfaces/node'; -import {RNode} from './interfaces/renderer_dom'; +import {RElement, RNode} from './interfaces/renderer_dom'; import { CONTEXT, HEADER_OFFSET, + INJECTOR, LView, LViewEnvironment, LViewFlags, @@ -71,25 +75,25 @@ import { } from './interfaces/view'; import {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces'; -import {ChainedInjector} from './chained_injector'; import {createElementNode, setupStaticAttributes} from './dom_node_manipulation'; -import {AttributeMarker} from './interfaces/attribute_marker'; -import {unregisterLView} from './interfaces/lview_tracking'; -import {CssSelector} from './interfaces/projection'; import { extractAttrsAndClassesFromSelector, stringifyCSSSelectorList, } from './node_selector_matcher'; -import {profiler} from './profiler'; -import {ProfilerEvent} from './profiler_types'; -import {executeContentQueries} from './queries/query_execution'; import {enterView, getCurrentTNode, getLView, leaveView} from './state'; import {computeStaticStyling} from './styling/static_styling'; -import {getOrCreateTNode} from './tnode_manipulation'; import {mergeHostAttrs} from './util/attrs_utils'; import {debugStringifyTypeForError, stringifyForError} from './util/stringify_utils'; -import {getComponentLViewByIndex, getTNode} from './util/view_utils'; +import {getComponentLViewByIndex, getNativeByTNode, getTNode} from './util/view_utils'; import {ViewRef} from './view_ref'; +import {ChainedInjector} from './chained_injector'; +import {unregisterLView} from './interfaces/lview_tracking'; +import {profiler} from './profiler'; +import {ProfilerEvent} from './profiler_types'; +import {executeContentQueries} from './queries/query_execution'; +import {AttributeMarker} from './interfaces/attribute_marker'; +import {CssSelector} from './interfaces/projection'; +import {getOrCreateTNode} from './tnode_manipulation'; export class ComponentFactoryResolver extends AbstractComponentFactoryResolver { /** @@ -324,7 +328,7 @@ export class ComponentFactory extends AbstractComponentFactory { null, null, ); - const rootLView = createLView( + const rootLView = createLView( null, rootTView, null, @@ -347,10 +351,10 @@ export class ComponentFactory extends AbstractComponentFactory { // issues would allow us to drop this. enterView(rootLView); + let component: T; let componentView: LView | null = null; try { - // TODO(pk): this is a good refactoring since it shows how to instantiate a TNOde with a set of known directive defs const rootComponentDef = this.componentDef; let rootDirectives: DirectiveDef[]; let hostDirectiveDefs: HostDirectiveDefs | null = null; @@ -384,18 +388,6 @@ export class ComponentFactory extends AbstractComponentFactory { tAttributes, ); - // TODO(pk): partial code duplication with resolveDirectives and other existing logic - markAsComponentHost(rootTView, hostTNode, rootDirectives.length - 1); - initializeDirectives( - rootTView, - rootLView, - hostTNode, - rootDirectives, - null, - hostDirectiveDefs, - ); - registerPostOrderHooks(rootTView, hostTNode); - for (const def of rootDirectives) { hostTNode.mergedAttrs = mergeHostAttrs(hostTNode.mergedAttrs, def.hostAttrs); } @@ -408,22 +400,31 @@ export class ComponentFactory extends AbstractComponentFactory { // tests so that this check can be removed. if (hostRNode) { setupStaticAttributes(hostRenderer, hostRNode, hostTNode); - attachPatchData(hostRNode, rootLView); } + componentView = createRootComponentView( + hostTNode, + hostRNode, + rootComponentDef, + rootDirectives, + rootLView, + environment, + ); + if (projectableNodes !== undefined) { projectNodes(hostTNode, this.ngContentSelectors, projectableNodes); } - // TODO(pk): this logic is similar to the instruction code where a node can have directives - createDirectivesInstances(rootTView, rootLView, hostTNode); - executeContentQueries(rootTView, hostTNode, rootLView); - - componentView = getComponentLViewByIndex(hostTNode.index, rootLView); - - // TODO(pk): why do we need this logic? - rootLView[CONTEXT] = componentView[CONTEXT] as T; - + // TODO: should LifecycleHooksFeature and other host features be generated by the compiler + // and executed here? Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref + component = createRootComponent( + componentView, + rootComponentDef, + rootDirectives, + hostDirectiveDefs, + rootLView, + [LifecycleHooksFeature], + ); renderView(rootTView, rootLView, null); } catch (e) { // Stop tracking the views if creation failed since @@ -441,7 +442,7 @@ export class ComponentFactory extends AbstractComponentFactory { const hostTNode = getTNode(rootTView, HEADER_OFFSET) as TElementNode; return new ComponentRef( this.componentType, - componentView[CONTEXT] as T, + component, createElementRef(hostTNode, rootLView), rootLView, hostTNode, @@ -526,10 +527,118 @@ export class ComponentRef extends AbstractComponentRef { } } -// TODO: remove? /** Represents a HostFeature function. */ type HostFeature = (component: T, componentDef: ComponentDef) => void; +/** + * Creates the root component view and the root component node. + * + * @param hostRNode Render host element. + * @param rootComponentDef ComponentDef + * @param rootView The parent view where the host node is stored + * @param rendererFactory Factory to be used for creating child renderers. + * @param hostRenderer The current renderer + * @param sanitizer The sanitizer, if provided + * + * @returns Component view created + */ +function createRootComponentView( + tNode: TElementNode, + hostRNode: RElement | null, + rootComponentDef: ComponentDef, + rootDirectives: DirectiveDef[], + rootView: LView, + environment: LViewEnvironment, +): LView { + const tView = rootView[TVIEW]; + + // Hydration info is on the host element and needs to be retrieved + // and passed to the component LView. + let hydrationInfo: DehydratedView | null = null; + if (hostRNode !== null) { + hydrationInfo = retrieveHydrationInfo(hostRNode, rootView[INJECTOR]); + } + const viewRenderer = environment.rendererFactory.createRenderer(hostRNode, rootComponentDef); + const componentView = createLView( + rootView, + getOrCreateComponentTView(rootComponentDef), + null, + getInitialLViewFlagsFromDef(rootComponentDef), + rootView[tNode.index], + tNode, + environment, + viewRenderer, + null, + null, + hydrationInfo, + ); + + if (tView.firstCreatePass) { + markAsComponentHost(tView, tNode, rootDirectives.length - 1); + } + + addToEndOfViewTree(rootView, componentView); + + // Store component view at node index, with node as the HOST + return (rootView[tNode.index] = componentView); +} + +/** + * Creates a root component and sets it up with features and host bindings.Shared by + * renderComponent() and ViewContainerRef.createComponent(). + */ +function createRootComponent( + componentView: LView, + rootComponentDef: ComponentDef, + rootDirectives: DirectiveDef[], + hostDirectiveDefs: HostDirectiveDefs | null, + rootLView: LView, + hostFeatures: HostFeature[] | null, +): any { + const rootTNode = getCurrentTNode() as TElementNode; + ngDevMode && assertDefined(rootTNode, 'tNode should have been already created'); + const tView = rootLView[TVIEW]; + const native = getNativeByTNode(rootTNode, rootLView); + + initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs); + + for (let i = 0; i < rootDirectives.length; i++) { + const directiveIndex = rootTNode.directiveStart + i; + const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode); + attachPatchData(directiveInstance, rootLView); + } + + invokeDirectivesHostBindings(tView, rootLView, rootTNode); + + if (native) { + attachPatchData(native, rootLView); + } + + // We're guaranteed for the `componentOffset` to be positive here + // since a root component always matches a component def. + ngDevMode && + assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1'); + const component = getNodeInjectable( + rootLView, + tView, + rootTNode.directiveStart + rootTNode.componentOffset, + rootTNode, + ); + componentView[CONTEXT] = rootLView[CONTEXT] = component; + + if (hostFeatures !== null) { + for (const feature of hostFeatures) { + feature(component, rootComponentDef); + } + } + + // We want to generate an empty QueryList for root content queries for backwards + // compatibility with ViewEngine. + executeContentQueries(tView, rootTNode, rootLView); + + return component; +} + /** Projects the `projectableNodes` that were specified when creating a root component. */ function projectNodes( tNode: TElementNode, diff --git a/packages/core/src/render3/instructions/element.ts b/packages/core/src/render3/instructions/element.ts index 62d4ff553da0..c9a186d489de 100644 --- a/packages/core/src/render3/instructions/element.ts +++ b/packages/core/src/render3/instructions/element.ts @@ -72,11 +72,7 @@ import {getConstant} from '../util/view_utils'; import {validateElementIsKnown} from './element_validation'; import {setDirectiveInputsWhichShadowsStyling} from './property'; -import { - createDirectivesInstancesInInstruction, - resolveDirectives, - saveResolvedLocalsInData, -} from './shared'; +import {createDirectivesInstances, resolveDirectives, saveResolvedLocalsInData} from './shared'; import {getOrCreateTNode} from '../tnode_manipulation'; function elementStartFirstCreatePass( @@ -176,7 +172,7 @@ export function ɵɵelementStart( increaseElementDepthCount(); if (hasDirectives) { - createDirectivesInstancesInInstruction(tView, lView, tNode); + createDirectivesInstances(tView, lView, tNode); executeContentQueries(tView, tNode, lView); } if (localRefsIndex !== null) { diff --git a/packages/core/src/render3/instructions/element_container.ts b/packages/core/src/render3/instructions/element_container.ts index e1791e37b0bb..3eef61a7d460 100644 --- a/packages/core/src/render3/instructions/element_container.ts +++ b/packages/core/src/render3/instructions/element_container.ts @@ -41,11 +41,7 @@ import { import {computeStaticStyling} from '../styling/static_styling'; import {getConstant} from '../util/view_utils'; -import { - createDirectivesInstancesInInstruction, - resolveDirectives, - saveResolvedLocalsInData, -} from './shared'; +import {createDirectivesInstances, resolveDirectives, saveResolvedLocalsInData} from './shared'; import {getOrCreateTNode} from '../tnode_manipulation'; function elementContainerStartFirstCreatePass( @@ -123,7 +119,7 @@ export function ɵɵelementContainerStart( attachPatchData(comment, lView); if (isDirectiveHost(tNode)) { - createDirectivesInstancesInInstruction(tView, lView, tNode); + createDirectivesInstances(tView, lView, tNode); executeContentQueries(tView, tNode, lView); } diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index c3fbd181620c..34c19f4c4b88 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -269,24 +269,12 @@ export function executeTemplate( } } -/** - * Creates directive instances. - */ -export function createDirectivesInstancesInInstruction( - tView: TView, - lView: LView, - tNode: TDirectiveHostNode, -) { - if (!getBindingsEnabled()) return; - attachPatchData(getNativeByTNode(tNode, lView), lView); - createDirectivesInstances(tView, lView, tNode); -} - /** * Creates directive instances. */ export function createDirectivesInstances(tView: TView, lView: LView, tNode: TDirectiveHostNode) { - instantiateAllDirectives(tView, lView, tNode); + if (!getBindingsEnabled()) return; + instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView)); if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) { invokeDirectivesHostBindings(tView, lView, tNode); } @@ -1004,7 +992,12 @@ function lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number /** * Instantiate all the directives that were previously resolved on the current node. */ -function instantiateAllDirectives(tView: TView, lView: LView, tNode: TDirectiveHostNode) { +function instantiateAllDirectives( + tView: TView, + lView: LView, + tNode: TDirectiveHostNode, + native: RNode, +) { const start = tNode.directiveStart; const end = tNode.directiveEnd; @@ -1012,7 +1005,7 @@ function instantiateAllDirectives(tView: TView, lView: LView, tNode: TDirectiveH // since it is used to inject some special symbols like `ChangeDetectorRef`. if (isComponentHost(tNode)) { ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode); - createComponentLView( + addComponentLogic( lView, tNode as TElementNode, tView.data[start + tNode.componentOffset] as ComponentDef, @@ -1023,6 +1016,8 @@ function instantiateAllDirectives(tView: TView, lView: LView, tNode: TDirectiveH getOrCreateNodeInjectorForNode(tNode, lView); } + attachPatchData(native, lView); + const initialInputs = tNode.initialInputs; for (let i = start; i < end; i++) { const def = tView.data[i] as DirectiveDef; @@ -1279,11 +1274,7 @@ export function getInitialLViewFlagsFromDef(def: ComponentDef): LViewFl return flags; } -export function createComponentLView( - lView: LView, - hostTNode: TElementNode, - def: ComponentDef, -): LView { +function addComponentLogic(lView: LView, hostTNode: TElementNode, def: ComponentDef): void { const native = getNativeByTNode(hostTNode, lView) as RElement; const tView = getOrCreateComponentTView(def); @@ -1309,7 +1300,7 @@ export function createComponentLView( // Component view will always be created before any injected LContainers, // so this is a regular element, wrap it with the component view - return (lView[hostTNode.index] = componentView); + lView[hostTNode.index] = componentView; } export function elementAttributeInternal( diff --git a/packages/core/src/render3/instructions/template.ts b/packages/core/src/render3/instructions/template.ts index d012ade569c6..05b209f3e76f 100644 --- a/packages/core/src/render3/instructions/template.ts +++ b/packages/core/src/render3/instructions/template.ts @@ -39,7 +39,7 @@ import {getConstant} from '../util/view_utils'; import { addToEndOfViewTree, - createDirectivesInstancesInInstruction, + createDirectivesInstances, createLContainer, createTView, resolveDirectives, @@ -154,7 +154,7 @@ export function declareTemplate( populateDehydratedViewsInLContainer(lContainer, tNode, declarationLView); if (isDirectiveHost(tNode)) { - createDirectivesInstancesInInstruction(declarationTView, declarationLView, tNode); + createDirectivesInstances(declarationTView, declarationLView, tNode); } if (localRefsIndex != null) { diff --git a/packages/core/test/bundling/animations-standalone/bundle.golden_symbols.json b/packages/core/test/bundling/animations-standalone/bundle.golden_symbols.json index 2c3d7c96fef0..eeaca8775b63 100644 --- a/packages/core/test/bundling/animations-standalone/bundle.golden_symbols.json +++ b/packages/core/test/bundling/animations-standalone/bundle.golden_symbols.json @@ -92,6 +92,7 @@ "KeyEventsPlugin", "LEAVE_TOKEN_REGEX", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -200,6 +201,7 @@ "activeConsumer", "addClass", "addPropertyBinding", + "addToEndOfViewTree", "allocExpando", "allocLFrame", "angularZoneInstanceIdProperty", @@ -247,7 +249,6 @@ "context", "convertToBitFlags", "copyAnimationEvent", - "createDirectivesInstances", "createElementNode", "createElementRef", "createErrorClass", @@ -306,6 +307,7 @@ "getDirectiveDef", "getFactoryDef", "getFirstLContainer", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -317,6 +319,7 @@ "getNextLContainer", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", "getOrCreateTNode", @@ -356,6 +359,7 @@ "internalProvideZoneChangeDetection", "interpolateParams", "invalidTimingValue", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "invokeQuery", "isAngularZoneProperty", diff --git a/packages/core/test/bundling/animations/bundle.golden_symbols.json b/packages/core/test/bundling/animations/bundle.golden_symbols.json index 8939ba2f4ade..acbb5dddadc2 100644 --- a/packages/core/test/bundling/animations/bundle.golden_symbols.json +++ b/packages/core/test/bundling/animations/bundle.golden_symbols.json @@ -98,6 +98,7 @@ "KeyEventsPlugin", "LEAVE_TOKEN_REGEX", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -219,6 +220,7 @@ "activeConsumer", "addClass", "addPropertyBinding", + "addToEndOfViewTree", "allocExpando", "allocLFrame", "angularZoneInstanceIdProperty", @@ -266,7 +268,6 @@ "context", "convertToBitFlags", "copyAnimationEvent", - "createDirectivesInstances", "createElementNode", "createElementRef", "createErrorClass", @@ -327,6 +328,7 @@ "getDirectiveDef", "getFactoryDef", "getFirstLContainer", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -339,6 +341,7 @@ "getNgZoneOptions", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", "getOrCreateTNode", @@ -379,6 +382,7 @@ "internalProvideZoneChangeDetection", "interpolateParams", "invalidTimingValue", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "invokeQuery", "isAngularZoneProperty", diff --git a/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json b/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json index 64603b671133..84033396a41f 100644 --- a/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json +++ b/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json @@ -66,6 +66,7 @@ "InputFlags", "KeyEventsPlugin", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "Module", @@ -165,6 +166,7 @@ "_wasLastNodeCreated", "activeConsumer", "addPropertyBinding", + "addToEndOfViewTree", "allocExpando", "allocLFrame", "angularZoneInstanceIdProperty", @@ -201,7 +203,6 @@ "consumerPollProducersForChange", "context", "convertToBitFlags", - "createDirectivesInstances", "createElementNode", "createElementRef", "createErrorClass", @@ -255,6 +256,7 @@ "getDirectiveDef", "getFactoryDef", "getFirstLContainer", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -267,6 +269,7 @@ "getNgZoneOptions", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", "getOrCreateTNode", @@ -302,6 +305,7 @@ "instructionState", "internalImportProvidersFrom", "internalProvideZoneChangeDetection", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "isAngularZoneProperty", "isApplicationBootstrapConfig", diff --git a/packages/core/test/bundling/defer/bundle.golden_symbols.json b/packages/core/test/bundling/defer/bundle.golden_symbols.json index a9f2d40a045c..29419f5b756c 100644 --- a/packages/core/test/bundling/defer/bundle.golden_symbols.json +++ b/packages/core/test/bundling/defer/bundle.golden_symbols.json @@ -87,6 +87,7 @@ "KeyEventsPlugin", "LOADING_AFTER_SLOT", "LOCALE_ID2", + "LifecycleHooksFeature", "MATH_ML_NAMESPACE", "MAXIMUM_REFRESH_RERUNS", "MINIMUM_SLOT", @@ -246,7 +247,6 @@ "convertToBitFlags", "createContainerAnchorImpl", "createDirectivesInstances", - "createDirectivesInstancesInInstruction", "createElementNode", "createElementRef", "createEnvironmentInjector", @@ -309,6 +309,7 @@ "getFactoryDef", "getFirstLContainer", "getFirstNativeNode", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -323,6 +324,7 @@ "getNextLContainer", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateEnvironmentInjector", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", @@ -754,6 +756,7 @@ "internalImportProvidersFrom", "internalProvideZoneChangeDetection", "invokeAllTriggerCleanupFns", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "invokeTriggerCleanupFns", "isAngularZoneProperty", diff --git a/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json b/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json index 8fa6e2b35f7e..0f35ebd2f784 100644 --- a/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json +++ b/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json @@ -99,6 +99,7 @@ "IterableDiffers", "KeyEventsPlugin", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -294,7 +295,6 @@ "controlPath", "convertToBitFlags", "createDirectivesInstances", - "createDirectivesInstancesInInstruction", "createElementNode", "createElementRef", "createErrorClass", @@ -372,6 +372,7 @@ "getFactoryOf", "getFirstLContainer", "getFirstNativeNode", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -385,6 +386,7 @@ "getNgZoneOptions", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", "getOrCreateTNode", @@ -442,6 +444,7 @@ "instructionState", "internalImportProvidersFrom", "internalProvideZoneChangeDetection", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "isAbstractControlOptions", "isAngularZoneProperty", diff --git a/packages/core/test/bundling/forms_template_driven/bundle.golden_symbols.json b/packages/core/test/bundling/forms_template_driven/bundle.golden_symbols.json index 11f33d82d745..a61bf78ddd7c 100644 --- a/packages/core/test/bundling/forms_template_driven/bundle.golden_symbols.json +++ b/packages/core/test/bundling/forms_template_driven/bundle.golden_symbols.json @@ -92,6 +92,7 @@ "IterableDiffers", "KeyEventsPlugin", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -282,7 +283,6 @@ "controlPath", "convertToBitFlags", "createDirectivesInstances", - "createDirectivesInstancesInInstruction", "createElementNode", "createElementRef", "createErrorClass", @@ -358,6 +358,7 @@ "getFactoryOf", "getFirstLContainer", "getFirstNativeNode", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -371,6 +372,7 @@ "getNgZoneOptions", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", "getOrCreateTNode", @@ -429,6 +431,7 @@ "instructionState", "internalImportProvidersFrom", "internalProvideZoneChangeDetection", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "isAngularZoneProperty", "isApplicationBootstrapConfig", diff --git a/packages/core/test/bundling/hello_world/bundle.golden_symbols.json b/packages/core/test/bundling/hello_world/bundle.golden_symbols.json index f4a3926af840..f267aee51667 100644 --- a/packages/core/test/bundling/hello_world/bundle.golden_symbols.json +++ b/packages/core/test/bundling/hello_world/bundle.golden_symbols.json @@ -46,6 +46,7 @@ "Injector", "InputFlags", "LOCALE_ID2", + "LifecycleHooksFeature", "NEW_LINE", "NG_COMP_DEF", "NG_ELEMENT_ID", @@ -245,7 +246,6 @@ "isAngularZoneProperty", "isApplicationBootstrapConfig", "isComponentDef", - "isComponentHost", "isDestroyed", "isEnvironmentProviders", "isFunction", @@ -312,7 +312,6 @@ "setCurrentQueryIndex", "setIncludeViewProviders", "setInjectImplementation", - "setInputsFromAttrs", "setIsRefreshingViews", "setSelectedIndex", "shouldSearchParent", diff --git a/packages/core/test/bundling/hydration/bundle.golden_symbols.json b/packages/core/test/bundling/hydration/bundle.golden_symbols.json index f83bcb5c9077..e313ef71e5bc 100644 --- a/packages/core/test/bundling/hydration/bundle.golden_symbols.json +++ b/packages/core/test/bundling/hydration/bundle.golden_symbols.json @@ -74,6 +74,7 @@ "InputFlags", "KeyEventsPlugin", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -419,7 +420,6 @@ "setCurrentTNode", "setIncludeViewProviders", "setInjectImplementation", - "setInputsFromAttrs", "setIsRefreshingViews", "setSegmentHead", "setSelectedIndex", diff --git a/packages/core/test/bundling/router/bundle.golden_symbols.json b/packages/core/test/bundling/router/bundle.golden_symbols.json index 7f5e21d9a6d2..64acc95337d4 100644 --- a/packages/core/test/bundling/router/bundle.golden_symbols.json +++ b/packages/core/test/bundling/router/bundle.golden_symbols.json @@ -102,6 +102,7 @@ "LOCALE_ID2", "LQueries_", "LQuery_", + "LifecycleHooksFeature", "ListComponent", "Location", "LocationStrategy", @@ -335,7 +336,6 @@ "createChildrenForEmptyPaths", "createContainerRef", "createContentQuery", - "createDirectivesInstances", "createElementNode", "createElementRef", "createEmptyState", @@ -443,6 +443,7 @@ "getFirstNativeNode", "getIdxOfMatchingSelector", "getInherited", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -456,6 +457,7 @@ "getNgModuleDef", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateLViewCleanup", "getOrCreateNodeInjectorForNode", @@ -518,6 +520,7 @@ "instructionState", "internalImportProvidersFrom", "internalProvideZoneChangeDetection", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "isAngularZoneProperty", "isApplicationBootstrapConfig", diff --git a/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json b/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json index c9453f089949..0b5b4deb652b 100644 --- a/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json +++ b/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json @@ -62,6 +62,7 @@ "InputFlags", "KeyEventsPlugin", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -274,7 +275,6 @@ "isAngularZoneProperty", "isApplicationBootstrapConfig", "isComponentDef", - "isComponentHost", "isDestroyed", "isEnvironmentProviders", "isFunction", @@ -347,7 +347,6 @@ "setCurrentTNode", "setIncludeViewProviders", "setInjectImplementation", - "setInputsFromAttrs", "setIsRefreshingViews", "setSelectedIndex", "shimStylesContent", diff --git a/packages/core/test/bundling/todo/bundle.golden_symbols.json b/packages/core/test/bundling/todo/bundle.golden_symbols.json index 61562fb15c63..4fe2dde60069 100644 --- a/packages/core/test/bundling/todo/bundle.golden_symbols.json +++ b/packages/core/test/bundling/todo/bundle.golden_symbols.json @@ -69,6 +69,7 @@ "IterableDiffers", "KeyEventsPlugin", "LOCALE_ID2", + "LifecycleHooksFeature", "MODIFIER_KEYS", "MODIFIER_KEY_GETTERS", "NAMESPACE_URIS", @@ -239,7 +240,6 @@ "context", "convertToBitFlags", "createDirectivesInstances", - "createDirectivesInstancesInInstruction", "createElementNode", "createElementRef", "createErrorClass", @@ -301,6 +301,7 @@ "getFactoryDef", "getFirstLContainer", "getFirstNativeNode", + "getInitialLViewFlagsFromDef", "getInjectImplementation", "getInjectableDef", "getInjectorDef", @@ -315,6 +316,7 @@ "getNgZoneOptions", "getNodeInjectable", "getNullInjector", + "getOrCreateComponentTView", "getOrCreateInjectable", "getOrCreateNodeInjectorForNode", "getOrCreateTNode", @@ -363,6 +365,7 @@ "instructionState", "internalImportProvidersFrom", "internalProvideZoneChangeDetection", + "invokeDirectivesHostBindings", "invokeHostBindingsInCreationMode", "isAngularZoneProperty", "isApplicationBootstrapConfig",