@@ -8,11 +8,10 @@ import {
88 effect ,
99 getDebugNode ,
1010 inject ,
11- signal ,
12- untracked ,
1311 type Renderer2 ,
1412 type RendererType2 ,
1513} from '@angular/core' ;
14+ import { BehaviorSubject } from 'rxjs' ;
1615import { NGT_CATALOGUE } from '../di/catalogue' ;
1716import type { NgtInjectedRef } from '../di/ref' ;
1817import { NgtStore } from '../stores/store' ;
@@ -117,7 +116,7 @@ export class NgtRenderer implements Renderer2 {
117116 { __ngt_renderer__ : { rawValue : undefined } } ,
118117 // NOTE: we assign this manually to a raw value node
119118 // because we say it is a 'three' node but we're not using prepare()
120- { __ngt__ : { isRaw : true , parent : signal ( null ) } }
119+ { __ngt__ : { isRaw : true , parent : new BehaviorSubject ( null ) } }
121120 )
122121 ) ;
123122 }
@@ -243,7 +242,7 @@ export class NgtRenderer implements Renderer2 {
243242 // if both are three instances, straightforward case
244243 if ( pRS [ NgtRendererClassId . type ] === 'three' && cRS [ NgtRendererClassId . type ] === 'three' ) {
245244 // if child already attached to a parent, skip
246- if ( getLocalState ( newChild ) . parent && untracked ( getLocalState ( newChild ) . parent ) ) return ;
245+ if ( getLocalState ( newChild ) . parent ?. value ) return ;
247246 // attach THREE child
248247 attachThreeChild ( parent , newChild ) ;
249248 // here, we handle the special case of if the parent has a compoundParent, which means this child is part of a compound parent template
@@ -284,7 +283,7 @@ export class NgtRenderer implements Renderer2 {
284283
285284 const shouldFindGrandparentInstance =
286285 // if child is three but haven't been attached to a parent yet
287- ( cRS [ NgtRendererClassId . type ] === 'three' && ! untracked ( getLocalState ( newChild ) . parent ) ) ||
286+ ( cRS [ NgtRendererClassId . type ] === 'three' && ! getLocalState ( newChild ) . parent . value ) ||
288287 // or both parent and child are DOM elements
289288 // or they are compound AND haven't had a THREE instance yet
290289 ( ( pRS [ NgtRendererClassId . type ] === 'dom' ||
0 commit comments