14.2.13 • Published 5 months ago

@ciag/component-factory v14.2.13

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
5 months ago

@ciag/component-factory

A angular Lib npm version

Objective: a simplyfied way to generate dynamic angular components, that can also be used as plain DOM.

API

Table of contents

  1. Installation
  2. Usage

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)
    }
}
14.2.13

5 months ago

13.3.0

2 years ago

0.0.1

2 years ago