# ngx-alerts

> USE [https://www.npmjs.com/package/@full-fledged/alerts](https://www.npmjs.com/package/@full-fledged/alerts)

Latest version **10.1.3** (published 2020-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-alerts
pnpm add ngx-alerts
yarn add ngx-alerts
bun add ngx-alerts
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 10.1.3 |
| Published | 2020-12-02 |
| First published | 2017-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 740.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Maintainers | mathijsblok |

## Links

- npm: https://www.npmjs.com/package/ngx-alerts
- Repository: https://github.com/MathijsBlok/ngx-alerts
- Homepage: https://github.com/MathijsBlok/ngx-alerts#readme
- Issues: https://github.com/MathijsBlok/ngx-alerts/issues
- npm.io page: https://npm.io/package/ngx-alerts

## Dependencies (1)

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

## Recent versions

- 10.1.3 (latest) — 2020-12-02
- 10.1.2 — 2020-10-30
- 10.1.1 — 2020-09-13
- 10.1.0 — 2020-09-13
- 10.0.0 — 2020-07-27
- 9.0.2 — 2020-04-22
- 9.0.1 — 2020-03-11
- 9.0.0 — 2020-03-11
- 4.0.0 — 2019-10-09
- 3.4.5 — 2019-05-23
- 3.4.4 — 2019-05-23
- 3.4.3 — 2019-04-23
- 3.4.2 — 2019-04-23
- 3.4.1 — 2019-03-10
- 3.4.0 — 2018-11-22
- … 31 more at https://npm.io/package/ngx-alerts/versions

## README

# ngx-alerts (DEPRECATED)

USE [https://www.npmjs.com/package/@full-fledged/alerts](https://www.npmjs.com/package/@full-fledged/alerts)


## Installation

To install this library, run:

```bash
$ npm install ngx-alerts --save
```

and then from your Angular `AppModule`:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import BrowserAnimationsModule
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";

// Import your library
import { AlertModule } from 'ngx-alerts';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserAnimationsModule,
    BrowserModule,

    // Specify your library as an import
    AlertModule.forRoot({maxMessages: 5, timeout: 5000, position: 'right'})
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

Import library with optional config AlertConfig. Default values are maxMessages: 5, timeout: 5000, position: 'right'.
Where the timeout is in milliseconds, and the position cn be either left or right.
<br>

Once your library is imported, you can use its components and service in your Angular application:

```xml
<!-- You can now use your library component in app.component.html -->
<h1>
  {{title}}
</h1>
<ngx-alerts></ngx-alerts>
```

```typescript
@Component({
    ...
})
export class AppComponent {

    constructor(private alertService: AlertService) {}
    
    showAlerts(): void{
        this.alertService.info('this is an info alert');
        this.alertService.danger('this is a danger alert');
        this.alertService.success('this is a success alert');
        this.alertService.warning('this is a warning alert');
    }    
}
```

## License

MIT © [Mathijs Blok](mailto:info@mathijsblok.com)

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