mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
feat(core): set kind field on template and effect nodes (#58865)
Builds on #58333 by assigning the kind field to reactive nodes that are not in the `core/primitives` package. PR Close #58865
This commit is contained in:
parent
8d6ea5bae3
commit
e894a5daea
2 changed files with 3 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ export function maybeReturnReactiveLViewConsumer(consumer: ReactiveLViewConsumer
|
|||
const REACTIVE_LVIEW_CONSUMER_NODE: Omit<ReactiveLViewConsumer, 'lView'> = {
|
||||
...REACTIVE_NODE,
|
||||
consumerIsAlwaysLive: true,
|
||||
kind: 'template',
|
||||
consumerMarkedDirty: (node: ReactiveLViewConsumer) => {
|
||||
markAncestorsForTraversal(node.lView!);
|
||||
},
|
||||
|
|
@ -80,6 +81,7 @@ export function getOrCreateTemporaryConsumer(lView: LView): ReactiveLViewConsume
|
|||
const TEMPORARY_CONSUMER_NODE = {
|
||||
...REACTIVE_NODE,
|
||||
consumerIsAlwaysLive: true,
|
||||
kind: 'template',
|
||||
consumerMarkedDirty: (node: ReactiveLViewConsumer) => {
|
||||
let parent = getLViewParent(node.lView!);
|
||||
while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW])) {
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ export const BASE_EFFECT_NODE: Omit<EffectNode, 'fn' | 'destroy' | 'injector' |
|
|||
hasRun: false,
|
||||
cleanupFns: undefined,
|
||||
zone: null,
|
||||
kind: 'effect',
|
||||
onDestroyFn: noop,
|
||||
run(this: EffectNode): void {
|
||||
this.dirty = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue