-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimearea: serverIssues related to server-side renderingIssues related to server-side renderingarea: zonesIssues related to zone.jsIssues related to zone.jsregressionIndicates than the issue relates to something that worked in a previous versionIndicates than the issue relates to something that worked in a previous version
Milestone
Description
Which @angular/* package(s) are the source of the bug?
platform-server, zone.js
Is this a regression?
Yes
Description
When using SSR/platform-server APIS to prerender pages, you can use the Zone.current.scheduleMacroTask() method to trigger the app to be "unstable" until its promise is resolved.
In v16, using the method call doesn't delay rendering to a string until the provided promise is resolved.
Steps to reproduce:
- Clone v16 repo provided below
- Run
npm installon the project - Run
ng build - Notice the
destroytext logged to the console with no other text logged
The component that does the logging
https://github.com/brandonroberts/analog-angular-v16-prerender/blob/main/src/app/pages/for.%5Bme%5D.page.ts
Steps reproduce v15 working example
- Clone v15 repo provided below
- Run
npm installon the project - Run
ng build - Notice the object text logged to the console
{
filename: '/src/content/pages/me.md',
slug: 'me',
attributes: {},
content: '## About Me'
}
- Notice the
destroytext logged to the console
- Tried downgrading
zone.jsto0.12.xwith no changes in behavior - Tried removing
provideClientHydration()with no changes in behavior
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
No exceptions thrown
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 16.0.2
Node: 18.13.0
Package Manager: npm 8.19.3
OS: darwin arm64
Angular: 16.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1600.2
@angular-devkit/build-angular 16.0.2
@angular-devkit/core 16.0.2
@angular-devkit/schematics 16.0.2
@schematics/angular 16.0.2
rxjs 7.5.7
typescript 5.0.4
Anything else?
This project is using Analog but standard Angular APIs are used for SSR/routing/components.
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimearea: serverIssues related to server-side renderingIssues related to server-side renderingarea: zonesIssues related to zone.jsIssues related to zone.jsregressionIndicates than the issue relates to something that worked in a previous versionIndicates than the issue relates to something that worked in a previous version