-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Defer block doesn't chunk components inside forwardRef #52014
Copy link
Copy link
Closed
Labels
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Defer block won't chunk the components that are used with a forwardRef.
@Component({
selector: 'app-root',
standalone: true,
imports: [forwardRef(() => DeferMeCmp)],
template: `
<button (click)="show.set(!show())">show</button>
<div>
@if (show()) {
@defer (on immediate) {
<defer-me />
}
}
</div>
`,
})
export class AppComponent {
show = signal(false);
}
// defer-me.cmp.ts
@Component({
selector: 'defer-me',
template: ` <div>Defered!</div> `,
standalone: true,
})
export class DeferMeCmp {}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)
No response
Anything else?
No response
Reactions are currently unavailable