A library for rendering dynamic Angular components with full lifecycle support for inputs and outputs.
ng-dynamic-component is an Angular library that enables developers to render components dynamically at runtime with comprehensive support for inputs, outputs, and lifecycle hooks. It provides a flexible and powerful alternative to Angular's built-in dynamic component rendering capabilities, making it essential for building highly dynamic and modular Angular applications.
Angular developers building applications that require runtime component rendering, such as plugin-based systems, dynamic dashboards, or modular UIs where components are not known at compile time.
Developers choose ng-dynamic-component because it offers full type safety, seamless integration with Angular's change detection and lifecycle hooks, and support for both module-based and standalone APIs, including signal-based components via a separate package.
Dynamic components with full life-cycle support for inputs and outputs for Angular
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly integrates with Angular's change detection and lifecycle hooks, ensuring dynamic components trigger standard hooks like ngOnInit and ngOnChanges as documented in the README examples.
Provides compile-time type checking for dynamic components, inputs, and outputs, reducing runtime errors and improving maintainability in complex applications.
Works with both module-based and standalone Angular APIs, plus supports NgComponentOutlet, offering multiple implementation paths as shown in the usage sections.
Includes features for custom injectors, providers, attributes, and experimental directives, enabling complex scenarios like plugin systems or dynamic dashboards.
Offers an optional separate package for signal-based component I/O, keeping up with Angular's latest trends and future-proofing applications.
Different features require separate imports (e.g., DynamicModule, DynamicIoModule), and the standalone API warns that using DynamicComponent alone doesn't support inputs/outputs, leading to confusion and setup complexity.
The dynamic directives feature is labeled experimental and has known issues, such as lack of support for @ContentChild and @HostBinding decorators, making it unreliable for production use in directive-heavy apps.
A new API proposal is under discussion, indicating future versions might introduce breaking changes, which could affect maintenance and upgrade paths for existing projects.