# ii-ngx-common

> Angular 2+ common components, pipes, services, directives

Latest version **1.7.33** (published 2021-06-14) · 0 weekly downloads

## Install

```sh
npm install ii-ngx-common
pnpm add ii-ngx-common
yarn add ii-ngx-common
bun add ii-ngx-common
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.33 |
| Published | 2021-06-14 |
| First published | 2020-11-28 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 85.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ildar-icoosoft |

## Links

- npm: https://www.npmjs.com/package/ii-ngx-common
- npm.io page: https://npm.io/package/ii-ngx-common

## Dependencies (1)

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

## Recent versions

- 1.7.33 (latest) — 2021-06-14
- 1.7.32 — 2021-04-26
- 1.7.31 — 2021-04-26
- 1.7.28 — 2021-04-25
- 1.7.27 — 2021-04-25
- 1.7.26 — 2021-04-25
- 1.8.0-alpha.0 — 2021-04-25
- 1.7.30-alpha.0 — 2021-04-25
- 1.7.28-alpha.0 — 2021-04-25
- 1.7.26-alpha.2 — 2021-04-25
- 1.7.26-alpha.1 — 2021-04-25
- 1.7.26-alpha.0 — 2021-04-25
- 1.7.25 — 2021-04-25
- 1.7.24 — 2021-04-25
- 1.7.23 — 2021-04-25
- … 35 more at https://npm.io/package/ii-ngx-common/versions

## README

# NgxCommon

Angular 2+ common components, pipes, services, directives

## Installation

1. Use npm to install the package

```terminal
$ npm install ii-ngx-common --save
```

2. You could either add into your module `imports` the `NgxCommonModule` in order to add all of the pipes

```typescript
import { NgxCommonModule } from "ii-ngx-common";

@NgModule({
 // ...
 imports: [
   // ...
   NgxCommonModule
 ]
})
```

## Safe pipe

Marks value that's safe to use as HTML, CSS, Script, etc.........

### Usage

```terminal
<div [innerHTML]="data | safe:'html'">Safe html</div>
<div [innerHTML]="data | safe:'style'">Safe css</div>
<div [innerHTML]="data | safe:'script'">Safe css</div>
<div [innerHTML]="data | safe:'url'">Safe css</div>
<div [innerHTML]="data | safe:'resourceUrl'">Safe css</div>
```

## Unsubscribe service

Observable service which is unsubscribed after service is destroyed.

### Usage

```terminal
import {UnsubscribeService} from "ii-ngx-common";

@Component({
  ...
  providers: [UnsubscribeService]
})
export class MyComponent {
  constructor(unsubscribeService$: UnsubscribeService) {
    someObservable.pipe(
	  takeUntil(unsubscribeService$)
	).subscribe(() => {
	  ...
	});
  }
}
```

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