Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydration doesn't work for ng-templates that are defined inside of another component #55677

Open
skoropadas opened this issue May 5, 2024 · 0 comments
Labels
area: core Issues related to the framework runtime bug core: hydration
Milestone

Comments

@skoropadas
Copy link

skoropadas commented May 5, 2024

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

Hydration doesn't work on ng-templates declared inside another component's tag, it feels like ng-content hydration somehow affects this.

For example, in this scenario, app-comp2 won't be hydrated:

<app-comp1 [content]="content">
  <ng-template #content>
    <app-comp2></app-comp2>
  </ng-template>
</app-comp1>

But it will in this case:

<app-comp1 [content]="content"></app-comp1>
<ng-template #content>
  <app-comp2></app-comp2>
</ng-template>

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.3.6
Node: 20.11.1
Package Manager: npm 10.2.4
OS: darwin arm64

Angular: 17.3.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.6
@angular-devkit/build-angular   17.3.6
@angular-devkit/core            17.3.6
@angular-devkit/schematics      17.3.6
@angular/cli                    17.3.6
@angular/ssr                    17.3.6
@schematics/angular             17.3.6
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.5

Anything else?

No response

@skoropadas skoropadas changed the title Hydration doesn't work for ng-template that are defined inside of another component Hydration doesn't work for ng-templates that are defined inside of another component May 5, 2024
@alxhub alxhub added area: core Issues related to the framework runtime core: hydration labels May 6, 2024
@ngbot ngbot bot modified the milestone: needsTriage May 6, 2024
@alxhub alxhub added the bug label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime bug core: hydration
Projects
None yet
Development

No branches or pull requests

2 participants