refactor(@angular/ssr): remove duplicate code and streamline functionality#28763
Conversation
6a75658 to
387fe14
Compare
02ef076 to
2dbed77
Compare
2dbed77 to
54aaa83
Compare
dgp1130
left a comment
There was a problem hiding this comment.
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.
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.
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
renderStaticmethod has been removed in favor of thehandlemethod for improved maintainability.