You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Projected content in a toggled @if comes back without its children with provideNgtRenderer() #95
I have noticed that with provideNgtRenderer(), content projected into an @if comes back empty after the @if turns off and on again. It happens to plain DOM elements, not only Three.js ones, because the renderer wraps every component's renderer.
without provideNgtRenderer(): <app-slot><span class="glyph">G</span><!--container--></app-slot>
with provideNgtRenderer(): <app-slot><span class="glyph"></span><!--container--></app-slot>
When Angular destroys the @if's view, it also calls destroyNode on the projected <span>, though the host's view still owns it and inserts it again later. NgtRenderer2.destroyNode runs internalDestroyNode(node, this.removeChild), which calls removeChild(node, child) for each of the span's children before the owner check, so the text node is taken out of the span for good:
I found it in an app built on AngularLynx, where a searchable select lost the icons of the items the search had hidden: Blotch-Smart-Frames/AngularLynx#380
angular-three 4.2.4 (the code is the same on main)
Activity