diff --git a/packages/core/src/render3/instructions/element.ts b/packages/core/src/render3/instructions/element.ts index 5c4b7c5080..6c8e1eb4a1 100644 --- a/packages/core/src/render3/instructions/element.ts +++ b/packages/core/src/render3/instructions/element.ts @@ -10,7 +10,7 @@ import {assertDataInRange, assertDefined, assertEqual} from '../../util/assert'; import {assertHasParent} from '../assert'; import {attachPatchData} from '../context_discovery'; import {registerPostOrderHooks} from '../hooks'; -import {TAttributes, TNodeFlags, TNodeType} from '../interfaces/node'; +import {TAttributes, TNodeType} from '../interfaces/node'; import {RElement} from '../interfaces/renderer'; import {StylingMapArray, TStylingContext} from '../interfaces/styling'; import {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks'; @@ -84,16 +84,6 @@ export function ɵɵelementStart( ngDevMode && ngDevMode.firstTemplatePass++; resolveDirectives(tView, lView, tNode, localRefs || null); - const inputData = tNode.inputs; - if (inputData != null) { - if (inputData.hasOwnProperty('class')) { - tNode.flags |= TNodeFlags.hasClassInput; - } - if (inputData.hasOwnProperty('style')) { - tNode.flags |= TNodeFlags.hasStyleInput; - } - } - if (tView.queries !== null) { tView.queries.elementStart(tView, tNode); } diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index d26f1691f8..8ca5f47cc4 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -843,6 +843,15 @@ function initializeInputAndOutputAliases(tView: TView, tNode: TNode): void { outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore); } + if (inputsStore !== null) { + if (inputsStore.hasOwnProperty('class')) { + tNode.flags |= TNodeFlags.hasClassInput; + } + if (inputsStore.hasOwnProperty('style')) { + tNode.flags |= TNodeFlags.hasStyleInput; + } + } + tNode.inputs = inputsStore; tNode.outputs = outputsStore; }