# ng2-pnotify

> A service wrapping pnotify for angular2.

Latest version **0.0.3** (published 2016-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng2-pnotify
pnpm add ng2-pnotify
yarn add ng2-pnotify
bun add ng2-pnotify
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-08-23 |
| First published | 2016-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kyle Kemp |
| Maintainers | seiyria |
| Keywords | ng2, angular2, pnotify, pines notify, notification |

## Links

- npm: https://www.npmjs.com/package/ng2-pnotify
- Repository: https://github.com/seiyria/ng2-pnotify
- Homepage: https://github.com/seiyria/ng2-pnotify#readme
- Issues: https://github.com/seiyria/ng2-pnotify/issues
- npm.io page: https://npm.io/package/ng2-pnotify

## Dependencies (1)

- [pnotify](https://npm.io/package/pnotify.md) ^3.0.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2016-08-23
- 0.0.2 — 2016-06-26
- 0.0.1 — 2016-06-26

## README

# ng2-pnotify
A service wrapping [PNotify](https://github.com/sciactive/pnotify) for ng2.

# Install
`npm i -s ng2-pnotify`

# Usage
First, bootstrap the service globally:

```js
import { PNotifySettings } from 'ng2-pnotify';

bootstrap(App, [
  provide(PNotifySettings, { useValue: { styling: 'bootstrap3' } }) // defaults to 'brighttheme'
]);
```

Next, inject it into a component:
```js
import { PNotifyService } from 'ng2-pnotify';

@Component({
  providers: [PNotifyService],
  template: `<button (click)="notify()">click</button>`
})
export class MyComponent {

  static get parameters() {
    return [[PNotifyService]];
  }

  constructor(pnotify) {
    this.pnotify = pnotify;
  }

  notify() {
    this.pnotify.info({ text: 'hello!' });
  }
}
```

# Options
Name      | Default       | Description
----      | -------       | -----------
styling   | 'brighttheme' | The theme for pnotify to use. Valid settings are 'brighttheme', 'jqueryui', 'fontawesome', 'bootstrap3' - you must have the corresponding CSS for each of these.

# Functions

Name      | Description
----      | -----------          
success   | Creates a success dialog.
notice    | Creates a notice dialog.
error     | Creates an error dialog.
info      | Creates an info dialog.
pnotify   | Creates a custom dialog.
desktop   | Requests permission to use desktop mode.

# TODO
Wrappers for more functions, like prompts, modals, confirms.

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