# @hangar42/ngx-injector

> ngxInjector is a simple and lightweight Angular module build to dynamically injecting components into the DOM.

Latest version **0.1.1** (published 2019-09-26) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @hangar42/ngx-injector
pnpm add @hangar42/ngx-injector
yarn add @hangar42/ngx-injector
bun add @hangar42/ngx-injector
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-09-26 |
| First published | 2019-09-26 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 41.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dennis Rösner |
| Maintainers | hangar42 |

## Links

- npm: https://www.npmjs.com/package/@hangar42/ngx-injector
- Repository: https://github.com/Hangar42-de/ngx-injector
- Homepage: https://hangar42.de
- Issues: https://github.com/Hangar42-de/ngx-injector/issues
- npm.io page: https://npm.io/package/@hangar42/ngx-injector

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 0.1.1 (latest) — 2019-09-26
- 0.1.0 — 2019-09-26

## README

# ngxInjector

ngxInjector is a simple and lightweight Angular module build to dynamically injecting components into the DOM.

## Installation

##### Install via [NPM](http://www.npmjs.org):
  ```bash
  npm install @hangar42/ngx-injector
  ```
  or manually [download](https://github.com/Hangar42-de/ngx-injector/archive/master.zip) it.

## Usage

##### 1. Include InjectorModule as a dependency in your desired module:
  ```javascript
  import {InjectorModule} from 'ngx-injector';
  ...
  imports: [
    InjectorModule,
    ...
   ]
  ```

##### 2. Use The InjectorService
 ```javascript
  import {InjectorService} from 'ngx-injector';
  import {SomeComponent} from '../some.component';
  ...

  constructor(private injectorService: InjectorService){}
  
  public someFunction(){
    const params = {
      ... properties you want to inject in the component
    }
    this.injectorService.injectComponent(SomeComponent, params);
  }
  ```

## Development

* Clone the repo or [download](https://github.com/Hangar42-de/ngx-injectorf/archive/master.zip) it
* Install dependencies: ``npm install``
* Run ``ng build --project ngx-injector``
* Run ``ng serve``

## License

GPLv3 [Link](https://github.com/Hangar42-de/ngx-injector/blob/master/LICENSE/)

## Maintainers

- [Hangar 42](https://hangar42.de)
- [Dennis Rösner](https://rösner.de)

---
_Source: https://npm.io/package/@hangar42/ngx-injector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
