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-tek-progress-bar

v0.2.1

Published

angular-tek-progress-bar is an AngularJS module to create and controls progress bar.

Downloads

21

Readme

License Build Status Codacy Badge Coverage Status Angular Tek Progress-bar

angular-tek-progress-bar is an AngularJS module to create and controls progress bar.

Overview

I began to code this module, because it became problematic to get a necessary behavior from ui.bootstrap.progressbar. Then i came across pg.progress-bars - it gave a possibility to reach the necessary behavior, but it had a couple of drawbacks - when the directive loaded during the controller processing, there was no possibility to gain the control of it. Also it is sometimes more comfortable for me to simply change the value of progress without additional methods. That's why i decided to combine the concepts of these two units, having reconsidered their concepts.

Features

  • Has two different control interfaces (simple by ng-model and advanced by manager)
  • Can control css animation
  • By default fully comparable with bootstrap
  • Fully customizable wia css
  • Can work without digest (if you do not use ng-model)
  • Has vertical mode

Demo

http://tekvando.github.io/Angular-Tek-Progress-bar/

Installing

Install through bower:

bower install --save angular-tek-progress-bar

or via npm

npm install --save angular-tek-progress-bar

or download

Initialize the plugin by referencing the necessary files:

<script src="dist/tek.progress-bar.min.js"></script>

if you want you can use my progress-bar styles

Define module in your app:

angular.module('yourModule', ['Tek.progressBar'])

Examples

Basic

Javascript

$scope.progressVal = 0;

Html

<tek-progress-bar ng-model="progressVal"></tek-progress-bar>

Advanced Through progressBarManager you can reach advanced control on progress bar

Javascript

$scope.progressManager = progressBarManager();

Html

<tek-progress-bar manager="progressManager"></tek-progress-bar>

Combined

Javascript

$scope.progressManager = progressBarManager(); 
$scope.progressVal = 0;

Html

<tek-progress-bar ng-model="progressVal" manager="progressManager"></tek-progress-bar>

Vertical mode required vertical class

$scope.progressVal = 0;   

Html

<tek-progress-bar mode="vertical" ng-model="progressVal""></tek-progress-bar>

Css

.progress.vertical {
    float: left;
    height: 100%;
    margin-right: 20px;
    width: 20px;
}

API

tek-progress-bar directive

Then value of progress-bar equal 0 it will be added class bar-empty Then value of progress-bar equal 100 it will be added class bar-full

<tek-progress-bar
	 manager="{object:progressBarManagerObject}"
	 class="{sting:progress-container-element-class}"
	 barClass="{sting:progress-bar-element-class}"
	 mode="{string: 'horizontal or vertical'}"
	 ng-model="{number:model}">
</tek-progress-bar>

template structure

<div class='progress' ng-class='bar.containerClass'>
	<div class='progress-bar' ng-class='bar.barClass' ng-transclude></div>
</div>

You can change it:

$templateCache.put('Tek.progressBarDirective.html', "Your template");

progressBarManager({object:paramsObj})

paramsObj: { incrementSpeed: {number} - default 300 incrementStrategy: {function} }

How it works

Then tek-progress-bar directive will initialize progressBarManager will set params witch you pass them from the controller. One of benefit to use progressBarManager its that you can manipulate tek-progress-bar directive even if its not initialized yet.

Method | Params | Return | Description | ------------| -------|--------------------------|--------------------------------------------------------------------------------| getPromise | | {object:promise} | this method return promise witch indicate then tek-progress-bar directive loaded | get | | {number} | this method return current progress value | set | number | {this} | this method set new progress value | start | | {this} | Start progress incrementation | stop | | {this} | Stop increasing | isInProgress| | {bool} | Indicate increasing status | increase | number | {this} | Increase value | done | | {this} | Set progress value to 100 and any set function will animate from 0 (if animation value is true)| reset | | {this} | Set progress value to 0 | clear | | {this} | Set progress value to 0 without animation | setAnimation| bool | {this} | Set animation value | isAnimated | | {bool} | indicate animation status |

Alternatives

https://github.com/PSDCoder/progress-bars https://github.com/angular-ui/bootstrap

License

is under MIT license - http://www.opensource.org/licenses/mit-license.php

Development

  • npm install to install development dependencies
  • gulp build to build minified demo in build
  • gulp serve to start build server
  • gulp test to run tests