This library is a directive that allows you to show progress status as bar or percentage.
- We will leave the Issues open as a discussion forum only.
- We do not guarantee a response from us in the Issues.
- We are no longer accepting pull requests.
bower install ng-file-upload --save
bower install https://github.com/platanus/angular-progress --save
Include the JS files in your project and the library as an Angular Dependency
angular.module('yourapp', ['platanus.progress']);
The library comes with a proposed stylesheet under
/dist/angular-progress.css
. You can use it or create your own.
<progress type="bar" progress-data="progressData"></progress>
Remove
type
option if wou want to see percentage.
$scope.progressData = { "loaded": 0, "total": 5000 };
$scope.progressData = { "loaded": 3000, "total": 5000 };
$scope.progressData = { "loaded": 5000, "total": 5000 };
$scope.progressData = { "loaded": 5000, "total": 5000, "error": true };
- progress-data: must be a json with the following structure:
{ "loaded": XXX, total: XXX }
.total
value represents the total file size.loaded
represents bytes loaded at a given time. You can passerror: true
key to add the error class if you want.
- hide-on-zero: if present, the directive will be hidden with progress value equals to 0%.
- hide-on-complete: if present, the directive will be hidden with progress value equals to 100% and no errors.
- type: with
"bar"
value, will show a progress bar. Withindicator
value will show a progress badge with this format{progress}%
(for example 35%). Default isindicator
.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Thank you contributors!
angular-progress is maintained by platanus.
angular-progress is © 2015 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.