17.0.0 • Published 2 years ago

inyector v17.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
2 years ago

npm version NPM Bundle Size Download

Inyector

Angular service for component injection

Installation

npm install inyector --save

Demo

You can see the demo in https://inyector.netlify.com/

Usage

Import

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { InyectorModule } from 'inyector';

@NgModule({
    imports: [
        BrowserModule,
        InyectorModule.forRoot()
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

Inject component in body

this.inyector.add(TestComponent);

Inject component in an element

this.inyector.add(TestComponent, {
    parent: htmlElement
});

Floating injection

Inject component in a floating docker and attach it to another element

this.inyector.dock(TestComponent, parentHtmlElement, {
    position: 'top'
});
17.0.0

2 years ago

16.2.12

2 years ago

14.0.0

2 years ago

14.0.1

2 years ago

14.3.0

2 years ago

15.2.10

2 years ago

13.0.0

3 years ago

12.0.0

4 years ago

11.0.0

4 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.3.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago