-
Notifications
You must be signed in to change notification settings - Fork 26.8k
refactor(platform-server): expose internal render method for extensibility
#60416
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
Conversation
…ibility The `renderApplication` and `renderModule` methods currently encapsulate the entire rendering process, making it difficult to intercept key phases from a non-Angular context. This change exports the internal `render` method, allowing us to perform operations such as: - Flushing headers before hydration preparation - Handling non static redirects (e.g., 302 responses) - Intercepting router events for additional processing This refactor serves as an experimental step toward improving the API for better customization and integration in the future.
hybrist
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a nice level of abstraction for exploration (and +1 on marking it as private API)! Thanks for the ping.
|
This PR was merged into the repository by commit bf5d995. The changes were merged into the following branches: main, 19.2.x |
…ibility (#60416) The `renderApplication` and `renderModule` methods currently encapsulate the entire rendering process, making it difficult to intercept key phases from a non-Angular context. This change exports the internal `render` method, allowing us to perform operations such as: - Flushing headers before hydration preparation - Handling non static redirects (e.g., 302 responses) - Intercepting router events for additional processing This refactor serves as an experimental step toward improving the API for better customization and integration in the future. PR Close #60416
| * @param applicationRef - Reference to the Angular application. | ||
| * @returns A promise that resolves to the rendered string. | ||
| */ | ||
| export async function renderInternal( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot 🙏 Even though this is private, this allows us to use incremental hydration without much hackery (as we also have a custom lifecycle on ssr)
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The
renderApplicationandrenderModulemethods currently encapsulate the entire rendering process, making it difficult to intercept key phases from a non-Angular context. This change exports the internalrendermethod, allowing us to perform operations such as:This refactor serves as an experimental step toward improving the API for better customization and integration in the future.
//cc @jkrems, I believe you might also find this useful.