AudioGrid component renders a dynamic grid of components with individually provided inputs.
app-audio-grid
true
CommonModule
componentsToRender
ngOnChanges(changes: SimpleChanges)
createInjector(inputs: any)
clearInjectorCache()
<app-audio-grid [componentsToRender]="[{ component: AudioCard, inputs: { name: 'Participant 1' } }]"></app-audio-grid> Copy
<app-audio-grid [componentsToRender]="[{ component: AudioCard, inputs: { name: 'Participant 1' } }]"></app-audio-grid>
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.
The changed properties.
AudioGrid component renders a dynamic grid of components with individually provided inputs.
Selector
app-audio-grid
Standalone
true
Imports
CommonModule
Inputs
componentsToRender
({ component: any; inputs?: any }[]): Array of components with optional inputs to render in the grid.Methods
ngOnChanges(changes: SimpleChanges)
: Clears the injector cache on changes tocomponentsToRender
.createInjector(inputs: any)
: Creates and caches an injector with specific inputs for each component.clearInjectorCache()
: Clears the cache to avoid memory leaks and ensure updated injectors.Example