🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

angular-notify

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-notify

Angular service for using browser notifications

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

angular-notify

NPM

Installation

Installation is super easy, simply add the dependencies to your angular module, and inject notify in your angular service, component, directive or controller.

# use npm
$ npm install angular-notify

Add angular-notify to your dependencies

angular
  .module('yourApp', ['angular-notify'])
  .controller('SampleController', function (notify) {
    function onClick () {
      console.log('clicked notification!')
    }

    notify.show('Example Notification', 'path/icon.jpg', 5000, onClick)
  })

API

message

The first parameter is the message for the notification

icon

The second parameter is the icon for the notification

timeout

timeout determines how long to keep the notification, (default is 5000 milliseconds)

callback

The function you want to call when the notification is clicked

Keywords

angular

FAQs

Package last updated on 04 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts