This commit introduces a number of changes to the server bootstrapping process to make it more robust and less error-prone, especially for concurrent requests.
Previously, the server rendering process relied on a module-level global platform injector. This could lead to issues in server-side rendering environments where multiple requests are processed concurrently, as they could inadvertently share or overwrite the global injector state.
The new approach introduces a `BootstrapContext` that is passed to the `bootstrapApplication` function. This context provides a platform reference that is scoped to the individual request, ensuring that each server-side render has an isolated platform injector. This prevents state leakage between concurrent requests and makes the overall process more reliable.
BREAKING CHANGE:
The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector.
Before:
```ts
const bootstrap = () => bootstrapApplication(AppComponent, config);
```
After:
```ts
const bootstrap = (context: BootstrapContext) =>
bootstrapApplication(AppComponent, config, context);
```
A schematic is provided to automatically update `main.server.ts` files to pass the `BootstrapContext` to the `bootstrapApplication` call.
In addition, `getPlatform()` and `destroyPlatform()` will now return `null` and be a no-op respectively when running in a server environment.
(cherry picked from commit 8bf80c9d2314b4f2bcf3df83ae01552a6fc49834)
PR Close#63640
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@remarks` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.
This change ensures that `@remarks` is treated the same as `@usageNotes` during the transform process.
PR Close#58523
This update corrects a grammatical error in the "CSS style properties" section of the template binding documentation. The sentence "You must create a new object instance when you modify these values in order to Angular to apply any updates" was updated to read correctly as "You must create a new object instance when you modify these values in order for Angular to apply any updates." This clarification helps improve readability and ensures the documentation communicates instructions accurately for readers.
PR Close#58491
Fixes external link for 'Everything you need to know about the "ExpressionChangedAfterItHasBeenCheckedError" error' on the NG0100 error page.
Domain has changed from indepth.dev to angularindepth.com
PR Close#58462
Remove an unnecessary whitespace between an opening parenthesis and a
word in the documentation on lifecycle.
Closes#58380
PR Close#58388
PR Close#58388
xterm was not resizing correctly when terminal/console component was resized.
- Load fitAddon for each terminal instance to enable resize.
- Use `ResizeObserver` to detect changes to the component size changes (window resize does not catch `as-split` events).
- Move padding from `.xterm-screen` to `.xterm` ancestor to fix text alignment.
Fixes#52645
PR Close#58257
Change diagram colors to:
- Better match the overall site theme.
- Improve dark theme.
- Make the diagram easier to understand. "Unchecked" nodes have no color and "Checked" nodes match the color of the "Event" node that triggered the change detection.
Fixes#56314
PR Close#58223
This commit updates the table of contents functionality to clean up correctly whenever the user
navigates to other pages and nodes are removed from the DOM.
Currently, calling `renderComponent` with the `TableOfContents` keeps creating a new table of contents
component without removing the previous one, as they are created manually.
This leads to memory leaks because the components cannot be collected properly, even if the user
navigates to the home page where there is no TOC component.
PR Close#58034
Added a new section in the documentation explaining how to lazy load a standalone component using `loadComponent`. This includes a code example demonstrating the setup in Angular routes.
PR Close#57620
Apply the min() function for set the smallest height
fix(docs-infra): move height into editor-wrapper
Move the calculation rule of height edit into editor-wrapper selector
fix(docs-infra): change has selector
Change the has selector
fix(docs-infra): change selector's for child
Changing the selector for test this solution
Fix
PR Close#54128
Remove max-height: 200px in ul child inline-errors-box, add the overflow & max-height in percentages to the parent for correct visualization
Fixes#52760
refactor(docs-infra): correct typo
Correct typo in comment
feat(docs-infra): modify the height of the editor
If error box are displayed, modify the height of the editor
PR Close#54128
In this commit, we're replacing the provided injector in `afterNextRender` with a node injector
because it was previously mistakenly passing an `EnvironmentInjector`. The `EnvironmentInjector`
resolves `DestroyRef` to itself, meaning that `AfterRenderSequence` is essentially never destroyed
(since the environment injector is not destroyed either).
PR Close#58030
This commit updates the tutorial component's functionality to unsubscribe from the route
data observable and stop monitoring the resizer element when the component is destroyed.
This is necessary because `monitor` adds event listeners that prevent the element and
component from being garbage collected.
PR Close#58028