Skip to content

ng2/notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notifications

a simple notifications service for angularjs

usage

Dropin somewhere in your config's a setup your defaults with

NotificationProvider.setDefaults({
  image: "path/to/your/default/image.png",
  title: "my default title",
  text: "my default body",
  show: 1000 // default delay to show, or just true to show immediately
});

And then from anywhere in your code create a new notification with

Notification.create({
  image: "path/to/your/awesome-image.png",
  title: "Ahoy!",
  text: "This is a notification yeah!",
  show: true
});

worth knowing

Notification.create will create a new notification if it can, or it will queue it and will ask the browser for permissions and then create it.

You can smash a bunch of Notification.create together and have the service queue them all with different timings so after the users gives the app permissions BAM, the notifications start flowing :)

Bitdeli Badge

About

webkit notification service for angularjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published