# Epom-ng2-mediators
Contains some very small classes that uses pub/sub to mediate events between components;

### Prerequisites

| Name | Description |
| ---- | ----------- |
| `pub/sub` | For this classes we don't  care what pub/sub module we have, single important rule: there must be implemented methods `.$sub` and `.$pub`. It will connect as property of constructor |

### Installing

We need to install `epom-ng2-mediators` via npm:

``` sh
$ npm i --save epom-ng2-mediators
```
After that you can import needed mediators and use them

## Parts
    .
    |-- epom-ng2-mediator
    |   |-- layoutChanged
    |   |   |-- mediator
    |   |   |-- constants

## Module Examples

```javascript
import {LayoutChangeMediator} from './shared/mediators/layoutChange/mediator';

@Injectable()
export class AppMediators {
  constructor(private pubSub: PubSubService) {
  new LayoutChangeMediator(pubSub);
}
}
```

## Contributors
Gennady Strelets <g.strelets@itmgmedia.net>
