{"id":13480808,"url":"https://github.com/moff/angular2-ladda","last_synced_at":"2025-07-15T19:20:02.721Z","repository":{"id":10635152,"uuid":"66435319","full_name":"moff/angular2-ladda","owner":"moff","description":"Angular 2 Ladda module","archived":false,"fork":false,"pushed_at":"2023-04-17T10:37:34.000Z","size":1436,"stargazers_count":97,"open_issues_count":4,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-07T06:13:03.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/moff.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-24T06:09:13.000Z","updated_at":"2024-07-18T07:19:34.000Z","dependencies_parsed_at":"2024-01-11T00:02:12.476Z","dependency_job_id":"ee580959-ac9a-4fb6-99dc-d98788d2cd34","html_url":"https://github.com/moff/angular2-ladda","commit_stats":{"total_commits":82,"total_committers":8,"mean_commits":10.25,"dds":"0.47560975609756095","last_synced_commit":"527c88050e1bbad96af252549322fbb8bcd0135b"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/moff/angular2-ladda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff%2Fangular2-ladda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff%2Fangular2-ladda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff%2Fangular2-ladda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff%2Fangular2-ladda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moff","download_url":"https://codeload.github.com/moff/angular2-ladda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff%2Fangular2-ladda/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265454163,"owners_count":23768285,"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":[],"created_at":"2024-07-31T17:00:45.292Z","updated_at":"2025-07-15T19:20:02.662Z","avatar_url":"https://github.com/moff.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized","Awesome Angular [![Awesome TipeIO](https://img.shields.io/badge/Awesome%20Angular-@TipeIO-6C6AE7.svg)](https://github.com/gdi2290/awesome-angular) [![Awesome devarchy.com](https://img.shields.io/badge/Awesome%20Angular-@devarchy.com-86BDC1.svg)](https://github.com/brillout/awesome-angular-components)","UI Components"],"sub_categories":["Uncategorized","Angular \u003ca id=\"angular\"\u003e\u003c/a\u003e","Loader"],"readme":"# Angular Ladda module\n\n[![npm version](https://img.shields.io/npm/v/angular2-ladda.svg)](https://www.npmjs.org/package/angular2-ladda)\n[![npm downloads](https://img.shields.io/npm/dt/angular2-ladda.svg)](https://www.npmjs.org/package/angular2-ladda)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](http://opensource.org/licenses/MIT)\n\nThis is a module for Angular 2+ that implements [Ladda](https://github.com/hakimel/Ladda).\n\n\u003ca href=\"https://lab.hakim.se/ladda/\" target_='blank'\u003eCheck out Ladda's demo\u003c/a\u003e\n\n## Installation\n\n- Run `npm install ladda angular2-ladda`\n\n- Add \"node_modules/ladda/dist/ladda.min.css\" or\n\"node_modules/ladda/dist/ladda-themeless.min.css\" to the \"styles\"\narray in your angular.json file. If you aren't using the Angular CLI,\nlink to the appropriate CSS file in your document instead. For example:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"node_modules/ladda/dist/ladda.min.css\"\u003e\n```\n\n- Import `LaddaModule` in your app's main module `app.module.ts`, e.g.:\n\n```typescript\n// other imports\n// ...\nimport { LaddaModule } from 'angular2-ladda';\n// ...\n\n@NgModule({\n    imports: [\n        // other imports\n        // ...\n        LaddaModule,\n        // ...\n    ]\n});\n```\n\nLadda defaults can be configured as follows:\n\n```typescript\n// other imports\n// ...\nimport { LaddaModule } from 'angular2-ladda';\n// ...\n\n@NgModule({\n    imports: [\n        // other imports\n        // ...\n        LaddaModule.forRoot({\n            style: \"contract\",\n            spinnerSize: 40,\n            spinnerColor: \"red\",\n            spinnerLines: 12\n        }),\n        // ...\n    ]\n});\n```\n\n## Usage\n\nAdd `[ladda]=\"isLoading\"` to a button tag in your template, e.g.:\n\n```html\n\u003cbutton [ladda]=\"isLoading\"\u003eSave\u003c/button\u003e\n```\n\nIn the component the value of `isLoading` can be changed to show/hide Ladda's spinner:\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n    template: `\n        \u003ch1\u003eHome Component\u003c/h1\u003e\n        \u003cbutton (click)=\"toggleLoading()\"\u003eToggle Ladda in button below\u003c/button\u003e\n        \u003chr\u003e\n        \u003cbutton [ladda]=\"isLoading\"\u003eSave\u003c/button\u003e\n    `\n})\nexport class HomeComponent {\n    // trigger-variable for Ladda\n    isLoading: boolean = false;\n    \n    toggleLoading() {\n        this.isLoading = !this.isLoading;\n    }\n}\n```\n\nButtons accept the following attributes:\n\n- data-style: one of the button styles, full list in [demo](http://lab.hakim.se/ladda/)\n- data-spinner-size: pixel dimensions of spinner, defaults to dynamic size based on the button height\n- data-spinner-color: hex code or any named CSS color\n- data-spinner-lines: the number of lines for the spinner, defaults to 12\n\n### Progress\n\nLoading progress can be shown by setting the bound value to a number (between 0 and 1) rather than `true`.\n\nFor example:\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n    template: `\n        \u003ch1\u003eHome Component\u003c/h1\u003e\n        \u003cbutton [ladda]=\"progress\" (click)=\"startLoading()\"\u003eClick to show progress\u003c/button\u003e\n    `\n})\nexport class HomeComponent {\n    progress: boolean | number = false;\n    \n    startLoading() {\n        this.progress = 0; // starts spinner\n\n        setTimeout(() =\u003e {\n            this.progress = 0.5; // sets progress bar to 50%\n\n            setTimeout(() =\u003e {\n                this.progress = 1; // sets progress bar to 100%\n\n                setTimeout(() =\u003e {\n                    this.progress = false; // stops spinner\n                }, 200);\n            }, 500);\n        }, 400);\n    }\n}\n```\n\n## Feedback\n\nPlease [leave your feedback](https://github.com/moff/angular2-ladda/issues) if you notice any issues or have a feature request.\n\n## License\n\nThe repository code is open-source software licensed under the [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoff%2Fangular2-ladda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoff%2Fangular2-ladda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoff%2Fangular2-ladda/lists"}