{"id":13802873,"url":"https://github.com/victorb/ngProgress","last_synced_at":"2025-05-13T13:33:10.542Z","repository":{"id":10175352,"uuid":"12260522","full_name":"victorb/ngProgress","owner":"victorb","description":"⏳ Angular provider for slim loading bar at the top of the page ( inspired by https://github.com/rstacruz/nprogress )","archived":false,"fork":false,"pushed_at":"2018-11-07T23:07:44.000Z","size":264,"stargazers_count":1479,"open_issues_count":22,"forks_count":236,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-05-01T05:58:41.798Z","etag":null,"topics":["angular","javascript","progressbar"],"latest_commit_sha":null,"homepage":"http://victorbjelkholm.github.io/ngProgress/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victorb.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-21T03:44:05.000Z","updated_at":"2025-04-15T06:28:23.000Z","dependencies_parsed_at":"2022-08-07T05:15:32.965Z","dependency_job_id":null,"html_url":"https://github.com/victorb/ngProgress","commit_stats":null,"previous_names":["victorbjelkholm/ngprogress"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorb%2FngProgress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorb%2FngProgress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorb%2FngProgress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorb%2FngProgress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorb","download_url":"https://codeload.github.com/victorb/ngProgress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154129,"owners_count":21862461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","javascript","progressbar"],"created_at":"2024-08-04T00:02:02.243Z","updated_at":"2025-05-13T13:33:10.208Z","avatar_url":"https://github.com/victorb.png","language":"JavaScript","readme":"## ngProgress.js\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/VictorBjelkholm/ngProgress?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build Status](https://travis-ci.org/VictorBjelkholm/ngProgress.png?branch=master)](https://travis-ci.org/VictorBjelkholm/ngProgress)\n\n[![CDNJS](https://img.shields.io/cdnjs/v/ngprogress.svg)](https://cdnjs.com/libraries/ngprogress)\n\n**ngProgress** is a provider for angular for showing a loading status of something.\nUse cases can be fetching external resources, showing a action taking more-than-normal length\nor simple loading between the page views. Prefereble, only for resource heavy sites.\n\n## Usage\n\nDownload ngProgress.js manually or install with bower\n\n```bash\n$ bower install ngprogress\n```\n\nInclude **ngProgress.js** ( or **ngprogress.min.js**) and **ngProgress.css** in your website.\n\n```html\n\u003cscript src=\"app/components/ngprogress/ngprogress.min.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"ngProgress.css\"\u003e\n```\n\nSet **ngProgress** as a dependency in your module\n\n```javascript\nvar app = angular.module('progressApp', ['ngProgress']);\n```\n\n\nInject **ngProgressFactory** in your controller\n\n```javascript\nvar MainCtrl = function($scope, $timeout, ngProgressFactory) {}\n```\n\nCreate a instance of the progressbar\n\n```javascript\n$scope.progressbar = ngProgressFactory.createInstance();\n```\n\nUse with the API down below\n\n```javascript\n$scope.progressbar.start();\n$timeout(function() {\n  $scope.progressbar.complete()\n}, 1000);\n```\n\n## API\n\n* **start** - Starts the animation and adds between 0 - 5 percent to loading\neach 400 milliseconds. Should always be finished with ngProgress.complete()\nto hide it\n\n```javascript\nngProgress.start();\n```\n* **setHeight** - Sets the height of the progressbar. Use any valid CSS value\nEg '10px', '1em' or '1%'\n\n```javascript\nngProgress.setHeight('10px');\n```\n\n* **setColor** - Sets the color of the progressbar and it's shadow. Use any valid HTML color\n\n```javascript\nngProgress.setColor('#fff');\n```\n\n* **status** - Returns on how many percent the progressbar is at. Should'nt be needed\n\n```javascript\nvar status = ngProgress.status();\n```\n\n* **stop** - Stops the progressbar at it's current location\n\n```javascript\nngProgress.stop();\n```\n\n* **set** - Set's the progressbar percentage. Use a number between 0 - 100. If 100 is provided, complete will be called.\n\n```javascript\nngProgress.set(100);\n```\n\n* **reset** - Resets the progressbar to percetage 0 and therefore will be hided after it's rollbacked\n\n```javascript\nngProgress.reset();\n```\n\n* **complete** - Jumps to 100% progress and fades away progressbar\n\n```javascript\nngProgress.complete();\n```\n\n* **setParent** - Changes the parent of the DOM element which visualizes the progress bar\n\n```javascript\nngProgress.setParent(document.getElementById('container'));\n```\n\n* **getDomElement** - Gets the DOM element  which visizualizes the progress bar. It is wrapped as a jqlite element - https://docs.angularjs.org/api/ng/function/angular.element\n\n```javascript\nvar element = ngProgress.getDomElement();\n```\n\n## Releasing a new version\n\nThe current (and quite hacky solution, honestly) to make a new release:\n\n* Update package.json to have new version.\n\n* Commit changes\n\n* Run ```bower version patch|minor|major```\n\n## Publishing new Github-pages version\n\nMerge ```master``` into ```gh-pages```, run ```grunt``` and push to Github\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Victor Bjelkholm\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorb%2FngProgress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorb%2FngProgress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorb%2FngProgress/lists"}