mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
@@ -261,7 +261,7 @@ export class CustomExpando {
|
||||
|
||||
In the example above, `CustomExpando` cannot find `<custom-toggle>` because it is not a direct child of `<custom-expando>`. By setting `descendants: true`, you configure the query to traverse all descendants in the same template. Queries, however, _never_ pierce into components to traverse elements in other templates.
|
||||
|
||||
View queries do not have this option because they _always_ traverse into descendents.
|
||||
View queries do not have this option because they _always_ traverse into descendants.
|
||||
|
||||
### Reading specific values from an element's injector
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ it('should render a defer block in different states', async () => {
|
||||
});
|
||||
```
|
||||
|
||||
## Behavior with Server-side rendering (SSR) and Static side generation (SSG)
|
||||
## Behavior with Server-side rendering (SSR) and Static site generation (SSG)
|
||||
|
||||
When rendering an application on the server (either using SSR or SSG), defer blocks always render their `@placeholder` (or nothing if a placeholder is not specified). Triggers are ignored on the server.
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ The following diagram represents the relationship between the `root` `ModuleInje
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
elementInjector: EnvironmentInjector\n(configured by Angular)\nhas special things like DomSanitizer => providedIn 'platform'
|
||||
rootInjector: root EnvironmentInjector\n(configured by AppCongfig)\nhas things for your app => bootstrapApplication(..., AppConfig)
|
||||
rootInjector: root EnvironmentInjector\n(configured by AppConfig)\nhas things for your app => bootstrapApplication(..., AppConfig)
|
||||
nullInjector: NullInjector\nalways throws an error unless\nyou use @Optional()
|
||||
|
||||
direction BT
|
||||
|
||||
@@ -206,7 +206,7 @@ flowchart TB
|
||||
direction TB
|
||||
FC2(FormControl)
|
||||
O(Observers)
|
||||
CVA(ControlValueAccesor)
|
||||
CVA(ControlValueAccessor)
|
||||
I("<input>")
|
||||
FC2-.->|Fires a 'valueChanges' event to observers|O
|
||||
O-->|ControlValueAccessor receives valueChanges event|CVA
|
||||
|
||||
@@ -39,7 +39,7 @@ If your backend service uses different names for the XSRF token cookie or header
|
||||
Add it to the `provideHttpClient` call as follows:
|
||||
|
||||
<docs-code language="ts">
|
||||
boostrapApplication(App, {providers: [
|
||||
bootstrapApplication(App, {providers: [
|
||||
provideHttpClient(
|
||||
withXsrfConfiguration({
|
||||
cookieName: 'CUSTOM_XSRF_TOKEN',
|
||||
@@ -54,7 +54,7 @@ boostrapApplication(App, {providers: [
|
||||
If the built-in XSRF protection mechanism doesn't work for your application, you can disable it using the `withNoXsrfProtection` feature:
|
||||
|
||||
<docs-code language="ts">
|
||||
boostrapApplication(App, {providers: [
|
||||
bootstrapApplication(App, {providers: [
|
||||
provideHttpClient(
|
||||
withNoXsrfProtection(),
|
||||
),
|
||||
|
||||
@@ -7,7 +7,7 @@ Before you can use `HttpClient` in your app, you must configure it using [depend
|
||||
`HttpClient` is provided using the `provideHttpClient` helper function, which most apps include in the application `providers` in `main.ts`.
|
||||
|
||||
<docs-code language="ts">
|
||||
boostrapApplication(App, {providers: [
|
||||
bootstrapApplication(App, {providers: [
|
||||
provideHttpClient(),
|
||||
]});
|
||||
</docs-code>
|
||||
@@ -42,7 +42,7 @@ export class ConfigService {
|
||||
### `withFetch`
|
||||
|
||||
<docs-code language="ts">
|
||||
boostrapApplication(App, {providers: [
|
||||
bootstrapApplication(App, {providers: [
|
||||
provideHttpClient(
|
||||
withFetch(),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Hydration Unsupported Projection of DOM Nodes
|
||||
|
||||
This error means that during the server-side serialization process, Angular encountered nodes that were created outside of Angular's context (i.e. using native DOM APIs) and found those nodes were provided as projectible nodes. They were likely provided using `ViewContainerRef.createComponent` or `createComponent` APIs. Angular hydration does not support this use case.
|
||||
This error means that during the server-side serialization process, Angular encountered nodes that were created outside of Angular's context (i.e. using native DOM APIs) and found those nodes were provided as projectable nodes. They were likely provided using `ViewContainerRef.createComponent` or `createComponent` APIs. Angular hydration does not support this use case.
|
||||
|
||||
More information about hydration can be found in [this guide](guide/hydration).
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Root element was not found
|
||||
|
||||
Bootstraped components are defined in the `bootstrap` property of an `@NgModule` decorator or as the first parameter of `boopstrapApplication` for standalone components.
|
||||
Bootstrapped components are defined in the `bootstrap` property of an `@NgModule` decorator or as the first parameter of `bootstrapApplication` for standalone components.
|
||||
|
||||
This error happens when Angular tries to bootstrap one of these components but cannot find its corresponing node in the DOM.
|
||||
This error happens when Angular tries to bootstrap one of these components but cannot find its corresponding node in the DOM.
|
||||
|
||||
## Debugging the error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user