Directive that exposes a ViewContainerRef for dynamic component loading.
This is used to create a reference point for dynamically loading components
into the DOM without manually handling ViewContainerRef injection.
Example
<!-- Intemplate --> <divmjContainer></div>
<!-- Incomponent --> @ViewChild(Container, { static:true }) container!: Container; // Now you can use this.container.viewContainerRef for dynamic component creation
Directive that exposes a ViewContainerRef for dynamic component loading. This is used to create a reference point for dynamically loading components into the DOM without manually handling ViewContainerRef injection.
Example