@ciag/component-factory
v14.2.13
Published
A simplyfied way to generate dynamic angular components, that can also be used as plain DOM.
Downloads
44
Maintainers
Keywords
Readme
@ciag/component-factory
Objective: a simplyfied way to generate dynamic angular components, that can also be used as plain DOM.
API
Table of contents
Installation
Intall the @ciag/component-factory via NPM
NPM
npm i @ciag/component-factory
Usage
app.module.ts
import { ComponentFactoryModule } from '@ciag/component-factory';
@NgModule({
//...
imports: [
//...
ComponentFactoryModule
],
//...
})
export class AppModule { }
my.component.ts
import { Component, OnInit } from '@angular/core';
import { ComponentFactoryService } from '@ciag/component-factory';
@Component({
//...
})
export class AppComponent implements OnInit {
//...
constructor(private componentFactoryService: ComponentFactoryService) { }
ngOnInit() {
this.componentFactoryService.create(MyComponent)
}
}