npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-ui-notifications

v1.0.6

Published

This is a package designed to allow you to produce notifications on your website. To get started run

Downloads

8

Readme

Angular UI Notifications

This is a package designed to allow you to produce notifications on your website. To get started run

npm install angular-ui-notifications --save

Once installed link your application to the following path.

<script src='node_modules/angular-ui-notifications/dist/angular-ui-notifications.min.js'></script>

In order for the icons to display properly ensure you require in the css file provided with the package.

<link rel='stylesheet' href='node_modules/angular-ui-notifications/dist/css/main.min.css'>

Usage

//Firstly we need to inject the angular-ui-notifications service into our application
angular.module("exampleApp", ['angular-ui-notifications'])
			
			// once we've done that we have access to the popups service which 
			// provides our main functionality.  

            .controller("main", ['$scope', 'popups',  function($scope, popups){
                
                $scope.info = function(msg){
                	// we can pass two parameters into the popups functionality
                	// msg - the message we want to display
                	// true / false - this boolean indicates whether we want the message
                	// to stay on the page indefinitely or not.
                    return popups.info(msg, true);
                };
				// Examples with the other function types
                $scope.success = function(msg){
                    return popups.success(msg);
                };
                $scope.warning = function(msg){
                    return popups.warning(msg);
                };
                $scope.error = function(msg){
                    return popups.error(msg)
                };

            }])		

Methods

  1. info - this produces an info style notification

  2. success - this produces a success style notification

  3. warning - this produces a warning style notification

  4. error - this produces an error style notification

  5. destroy - this removes the notification from the DOM with a fade effect. It takes place over 400ms

ToDo

New Methods

  1. setNotificationTimer - a method to allow you to to increase / decrease the time notifications are shown for

  2. setIconClasses - a method to allow you to replace the default icons.

Improvements

  1. Better SCSS support for the alert disappearing / appearing and moving effects

  2. Better animation effects