# epom-ng2-notifier
Provides notifications



## Getting Started

### Prerequisites

##### What things you need to install the software and how to install them. In example we need `day.js`

| Name | Description |
| ---- | ----------- |
| `epom-ng2-delayedactions` | this service provides opportunity to close notifications after delay

Install `epom-ng2-delayedactions` using epom-artefactory:
```sh
$ npm install --save epom-ng2-delayedactions
```


### Installing

Install epom-ng2-notifier using npm:
```sh
$ npm i --save epom-ng2-notifier
```
In your App.module add imports of NotifierModule, NotifierService, and add it to imports and providers:
```javascript
import {NotifierModule, NotifierService} from 'epom-ng2-notifier';
imports: [
    NotifierModule,
    ...
];
providers: [
    NotifierService,
    ...
];
```
## Parts
    .
    |-- epom-ng2-notifier
    |   |-- index
    |   |-- notifier.component
    |   |-- notifier.module
    |   |-- notifier.service

## Input properties (@Input)
| Name             | Type | Description                   |
| ---------------- | ---- | ----------------------------- |
| **time** | number | Max showing time. After that time notify will hide
| **maxNotes** | number | Max notes that shows same time on page |

## Service public methods
| Method Declaration                                                      | Description                                                                                                                |
| ----------------------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------|
| .**pushNotify**(notify: string, status: string, activeTime?: number): void | add notify that contains `notify` text and `status` (success, error, warning, info) that must be hidden after `activeTime` |
| .**clearAllNotifications**(): void| clear all shown notifications                                                                                              |


Examples:
```javascript
this.notifier.pushNotify('already in use', 'warning');
```
## Contributors

Gennady Strelets <g.strelets@itmgmedia.net>
