You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adev/src/content/guide/components/programmatic-rendering.md
+153Lines changed: 153 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,159 @@ export class CustomDialog {
41
41
}
42
42
```
43
43
44
+
### Passing inputs to dynamically rendered components
45
+
46
+
You can pass inputs to the dynamically rendered component using the `ngComponentOutletInputs` property. This property accepts an object where keys are input names and values are the input values.
The inputs are updated whenever the `greetingInputs` signal changes, keeping the dynamic component in sync with the parent's state.
79
+
80
+
### Providing content projection
81
+
82
+
Use `ngComponentOutletContent` to pass projected content to the dynamically rendered component. This is useful when the dynamic component uses `<ng-content>` to display content.
You can provide a custom injector to the dynamically created component using `ngComponentOutletInjector`. This is useful for providing component-specific services or configuration.
127
+
128
+
```angular-ts
129
+
export const THEME_DATA = new InjectionToken<string>('THEME_DATA', {
0 commit comments