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 install on the project
- Run
ng build
- Notice the
destroy text logged to the console with no other text logged
https://github.com/brandonroberts/analog-angular-v16-prerender
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 install on 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
destroy text logged to the console
https://github.com/brandonroberts/analog-angular-v15-prerender
- Tried downgrading
zone.js to 0.12.x with no changes in behavior
- Tried removing
provideClientHydration() with no changes in behavior
Please provide a link to a minimal reproduction of the bug
https://github.com/brandonroberts/analog-angular-v16-prerender
Please provide the exception or error you saw
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.
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:
npm installon the projectng builddestroytext logged to the console with no other text loggedhttps://github.com/brandonroberts/analog-angular-v16-prerender
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
npm installon the projectng builddestroytext logged to the consolehttps://github.com/brandonroberts/analog-angular-v15-prerender
zone.jsto0.12.xwith no changes in behaviorprovideClientHydration()with no changes in behaviorPlease provide a link to a minimal reproduction of the bug
https://github.com/brandonroberts/analog-angular-v16-prerender
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version)Anything else?
This project is using Analog but standard Angular APIs are used for SSR/routing/components.