Skip to content

Commit 5dd17d7

Browse files
SkyZeroZxamishne
authored andcommitted
docs: Update ngComponentOutlet binding and hydration note
1 parent 0045510 commit 5dd17d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adev/src/content/guide/components/programmatic-rendering.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export class DynamicCard {
121121
}
122122
```
123123

124+
NOTE: Hydration does not support projecting DOM nodes created with native DOM APIs. This causes an [NG0503 error](/errors/NG0503). Use Angular APIs to create projected content or add `ngSkipHydration` to the component.
125+
124126
### Providing injectors
125127

126128
You can provide a custom injector to the dynamically created component using `ngComponentOutletInjector`. This is useful for providing component-specific services or configuration.
@@ -178,7 +180,7 @@ export class Counter {
178180
imports: [NgComponentOutlet],
179181
template: `
180182
<ng-container
181-
*ngComponentOutlet="counterComponent"
183+
[ngComponentOutlet]="counterComponent"
182184
#outlet="ngComponentOutlet"
183185
/>
184186

0 commit comments

Comments
 (0)