mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08: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:
committed by
Pawel Kozlowski
parent
8d6ea5bae3
commit
e894a5daea
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user