-
Notifications
You must be signed in to change notification settings - Fork 11.9k
refactor(@angular/ssr): remove duplicate code and streamline functionality #28763
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
6a75658
to
387fe14
Compare
02ef076
to
2dbed77
Compare
2dbed77
to
54aaa83
Compare
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.
Sorry for the delay on this, just a few minor suggestions.
* | ||
* @private | ||
*/ | ||
static ɵhooks = /* #__PURE__*/ new Hooks(); | ||
static ɵallowStaticRouteRender = false; |
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.
Consider: Should this default to true
? If someone naiively uses this class without any extra context, they would likely expect static rendering to work. It's only specific dev use cases where a user would want to go out of their way to disable static rendering.
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.
This is actually to allow static pages to be renderer on the fly (ie: rendered as SSR), this does not effect serving of pre-rendered pages.
Only in the dev-server and builder should be done allowed.
…ality This commit cleans up duplicate code left from the previous implementations of process, serve, and render. Additionally, prerender serve now exclusively handles HEAD and GET requests, aligning with updated handling requirements. The private `renderStatic` method has been removed in favor of the `handle` method for improved maintainability.
54aaa83
to
e8741e8
Compare
The changes were merged into the following branches: main, 19.0.x |
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. |
This commit cleans up duplicate code left from the previous implementations of process, serve, and render. Additionally, prerender serve now exclusively handles HEAD and GET requests, aligning with updated handling requirements. The private
renderStatic
method has been removed in favor of thehandle
method for improved maintainability.