@ciag/component-factory
TypeScript icon, indicating that this package has built-in type declarations

14.2.13 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @ciag/component-factory

Weekly Downloads

2

Version

14.2.13

License

Apache 2.0

Unpacked Size

34.8 kB

Total Files

15

Last publish

Collaborators

  • ettoreleandrotognoli
  • rafael.lima
  • tiecoo
  • carlosbenedetti
  • leonardortlima
  • raacavalieri
  • ciag.dev
  • borba.victor