mypushnotify

push notification

Usage no npm install needed!

<script type="module">
  import mypushnotify from 'https://cdn.skypack.dev/mypushnotify';
</script>

README

readme

mypushnotify

Push Notifications on Current System. * Check the HowTo section below.

Features

  • Supports basic angular .
  • Supports multiple platforms
  • Emits an event after every notification release.
  • Nice devs behind it. 🤓

* Check the Updates section below.

* Check the Hints section below.

HowTo

Important

I promise that it's very easy to use:

install using npm i mypushnotify

* Check the Usage section below.

Usage

app.module.ts

import { NotifyService } from 'mypushnotify/dist/notify.service';

providers:[NotifyService]

Call it from the html of the file from where you want to pop up notification , like

<button (click)="notify()">Show Notiication

In your component.ts use this like

import { NotifyService } from 'mypushnotify/dist/notify.service';

  • For sending multiple notifications.

notify() { const data: Array = []; data.push({ 'title': 'Notification 1', 'alertContent': 'This is First Alert ', renotify:true }); data.push({ 'title': 'Notification 2', 'alertContent': 'This is Second Alert ' }); data.push({ 'title': 'Notification 3', 'alertContent': 'This is Third Alert ' }); data.push({ 'title': 'Notification 4', 'alertContent': 'This is Fourth Alert ' }); data.push({ 'title': 'Notification 5', 'alertContent': 'This is Fifth Alert ' });

var count = 0;
var notificationInterval = setInterval(() => {
  if (count < data.length) {
    this._notificationService.generateNotification([data[count]]:Array<any>,((val)=>{
      console.log(val);}));
    count += 1;
  }
  else
    clearInterval(notificationInterval);
}, 1000);

}

  • For sending multiple notifications.

notify() { const data: Array = []; data.push({ 'title': 'Notification 1', 'alertContent': 'This is First Alert', renotify:true });

 this._notificationService.generateNotification([data[0]]):Array<any>,((val)=>{
      console.log(val);}));
  }

}

For further help

* Check the Help section below.

Hints

  • Send multiple and single push notifications easily on local system where button is clicked.
  • Use window's default permissions to send local notifications.
  • No maximum limit for notifications.

Demo

Previews needs to be opened in new standalone windows.

Repositories

Help

If you need help you can contact to iashish480@gmail.com with a subject "HELP REGARDING NOTIFICATIONS" in the mail.