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-progress-button

v0.4.0

Published

Brings buttons with built-in progress meters to AngularJS.

Downloads

42

Readme

angular-progress-button

Greenkeeper badge

Build Status Bower version npm version Known Vulnerabilities

Brings buttons with built-in progress meters to AngularJS. Take a look at the example page.

Usage

Installing

Download progress-button.min.js and progress-button.min.css from the dist directory or install using Bower:

$ bower install angular-progress-button-enhanced

Or npm:

$ npm install angular-progress-button

Then include both files.

HTML

As an element

<!-- Simple button -->
<progress-button value="progress">Button</a>

<!-- Custom in-progress and completion text -->
<progress-button value="progress" in-progress="Generating…" complete="Download">Generate</a>

As an attribute

<!-- Simple button -->
<button progress-button value="progress">Button</button>

<!-- Horizontal type -->
<button progress-button value="progress" type="horizontal">Button</button>

<!-- <a> tag with custom in-progress and completion text -->
<a progress-button value="progress" in-progress="Generating…" complete="Download">Generate</a>

Attributes

value (Number)

Progress value, must range from 0 (default) to 1.0.

type (String)

Style of progress animation, horizontal (default), vertical or bottom-bar.

in-progress (String)

Text which is shown when value is between 0 and 1.0, defaults to Loading….

complete (String)

Text which is shown when value is 1.0, defaults to Complete.

JavaScript

angular.module('progressButtonDemo', ['progressButton'])
  .controller('ProgressButtonsCtrl', function($scope) {
    $scope.progress = 0.5;
  })

Running tests

Install all dependencies using:

$ npm install

Run the Karma test runner:

$ ./node_modules/karma/bin/karma start

You can also execute a single run in PhantomJS using grunt test.

Release History

  • v0.3.1 (2017-07-07): Fixed injection to support stricter angular (1.6)
  • v0.3.0 (2015-04-21): Allow directive to be used as an attribute
  • v0.2.0 (2015-01-20):
    • Remove custom color themes
    • Drop -moz- prefix for CSS transitions and CSS gradients
    • Dynamically resize buttons to fit text in any state
  • v0.1.1 (2014-08-03): Add minified version (see dist/)
  • v0.1.0 (2014-06-14): Initial release

License

angular-progress-button is licensed under the BSD 2-clause license. See LICENSE for the full license.


The original design and implementation is from Tutorialzine’s “Buttons With Built-in Progress Meters” tutorial. Their license reads as follows:

The source code and techniques, covered in our tutorials, are free for use in your personal and commercial projects. The text and images of our articles, however, are copyrighted and may not be used or copied without written permission (this includes translation of the articles in different languages).

You can use, modify and build upon our code for your (or your clients’) personal and commercial projects with no attribution necessary.

You are not allowed to redistribute our demo files directly (you are encouraged to share a link to the tutorials instead).

If you plan to include our source code in site templates or to package it with other forms of digital content, meant for direct selling on online marketplaces (such as ThemeForest, ActiveDen etc.), you are required to include a back-link to the article in question on Tutorialzine.com.


angular-progress-button was originally written for a bounty on Bountify. The bounty poster has agreed to put the code under an open-source license.