{"id":14973536,"url":"https://github.com/helloilya/angular-promise-loader","last_synced_at":"2025-10-27T01:30:42.185Z","repository":{"id":32972560,"uuid":"36593042","full_name":"helloilya/angular-promise-loader","owner":"helloilya","description":"Angular directives to display loading of an indicate after pressing a button or a form based on promises","archived":false,"fork":false,"pushed_at":"2015-07-19T07:57:27.000Z","size":148,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T06:40:37.349Z","etag":null,"topics":["angular","button","form","loader","promise"],"latest_commit_sha":null,"homepage":"","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/helloilya.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":"2015-05-31T07:45:24.000Z","updated_at":"2019-03-20T14:26:16.000Z","dependencies_parsed_at":"2022-07-14T01:10:25.641Z","dependency_job_id":null,"html_url":"https://github.com/helloilya/angular-promise-loader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloilya%2Fangular-promise-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloilya%2Fangular-promise-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloilya%2Fangular-promise-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloilya%2Fangular-promise-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helloilya","download_url":"https://codeload.github.com/helloilya/angular-promise-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238306978,"owners_count":19450230,"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","button","form","loader","promise"],"created_at":"2024-09-24T13:48:55.277Z","updated_at":"2025-10-27T01:30:41.887Z","avatar_url":"https://github.com/helloilya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular promise loader\n\n\u003e Angular directives to display loading of an indicate after pressing a button or a form based on promises.\n\n### Demo\n\nExample loader is located [here](http://fedotov.work/angular-promise-loader/).\n\n### Usage\n\nInstall via bower:\n\n```\n$ bower install angular-promise-loader --save\n```\n\nor via npm:\n\n```\n$ npm install angular-promise-loader --save\n```\n\nor download the files from the `dist` folder into your repo.\n\nAdd `dist/loader.min.js` and `dist/loader.min.css` to your `index.html`. Then add `angularPromiseLoader` as a module dependency to your angular module.\n\n```js\nangular.module('myApp', ['angularPromiseLoader']);\n```\n\nCreate a new tag element, for example `button`, and add `ng-element-loader` attribute to element. Specify the promise function as an option. \n\n```html\n\u003cbutton type=\"button\" class=\"apl-button\" ng-element-loader=\"promiseFunction()\"\u003eButton\u003c/button\u003e\n```\n\nIf you have a form, add `ng-form-loader` attribute to submit button. After submitting, all `ng-model` elements of the form will be disabled until the promise response is received.\n\n```html\n\u003cform name=\"loaderForm\"\u003e\n\t\u003cinput type=\"text\" ng-model=\"input\"\u003e\n\t\u003cbutton type=\"submit\" class=\"apl-button\" ng-form-loader=\"promiseFunction()\"\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n\nThe module adds classes to an element for each state:\n\n* `apl-progress` while you are waiting for a promise response;\n* `apl-success` if response was a resolve;\n* `apl-error` if response was a reject.\n\nThe `dist/loader.min.css` file includes the default styles for states. You can use them with every front-end framework. Just add `apl-button` class to a button element.\n\n### Development\n\nInstall gulp via npm.\n\n```bash\nnpm install -g gulp\n```\n\nThen you can use the following commands for development:\n\n* `gulp watch` run a watcher for the `src` and `demo` folders;\n* `gulp build` build the project in `dist` folder.\n\n### Release History\n\n* 1.0.2 — Added npm support.\n* 1.0.1 — Updated texts.\n* 1.0.0 — Added bower support.\n* 0.1.1 — Added form loader example in the demo.\n* 0.1.0 — Initial release.\n\n### License\n\nMIT © [Ilya Fedotov](http://fedotov.me)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloilya%2Fangular-promise-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelloilya%2Fangular-promise-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloilya%2Fangular-promise-loader/lists"}