{"id":31999493,"url":"https://github.com/nisicadmir/ngx-loader","last_synced_at":"2025-10-15T14:08:52.735Z","repository":{"id":306148241,"uuid":"1025174174","full_name":"nisicadmir/ngx-loader","owner":"nisicadmir","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-31T10:39:14.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T10:54:43.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ngx-an-loader.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nisicadmir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-23T21:02:38.000Z","updated_at":"2025-08-31T10:39:17.000Z","dependencies_parsed_at":"2025-07-24T00:14:16.622Z","dependency_job_id":null,"html_url":"https://github.com/nisicadmir/ngx-loader","commit_stats":null,"previous_names":["nisicadmir/ngx-an-loader","nisicadmir/ngx-loader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nisicadmir/ngx-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisicadmir%2Fngx-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisicadmir%2Fngx-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisicadmir%2Fngx-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisicadmir%2Fngx-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nisicadmir","download_url":"https://codeload.github.com/nisicadmir/ngx-loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisicadmir%2Fngx-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279085157,"owners_count":26100015,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-15T14:01:44.575Z","updated_at":"2025-10-15T14:08:52.729Z","avatar_url":"https://github.com/nisicadmir.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Loaders"],"readme":"# Live demo deployed on Vercel.com\n\n[@nisix/ngx-loader Live app](https://ngx-loader.vercel.app/)\n\n# Installation\n\n```\nnpm install --save @nisix/ngx-loader\n```\n\n# Version Compatibility\n\nLoader is compatible with Angular 20 and newer\n\n## Usage\n\nTo use the `@nisix/ngx-loader` component in your Angular application, follow these steps:\n\n### Step 1: Import the Component\n\nAdd the `ngx-loader` component to your application template where you want the loader to appear. For example, in your `app.component.html`:\n\n```html\n\u003cngx-loader\u003e\u003c/ngx-loader\u003e\n\u003cbutton (click)=\"toggleLoader()\"\u003eToggle loader\u003c/button\u003e\n```\n\n### Step 2: Include the Service\n\nTo control the visibility of the loader, you need to use the `ngxLoaderService`. Inject this service into your component and use it to toggle the loader's visibility.\n\n#### Example in `app.component.ts`:\n\n```typescript\nimport { Component } from \"@angular/core\";\nimport { ngxLoaderService, NgxLoader } from \"@nisix/ngx-loader\";\n\n@Component({\n  selector: \"app-root\",\n  import: [NgxLoader], // \u003c- import component\n  templateUrl: \"./app.component.html\",\n  styleUrls: [\"./app.component.css\"],\n})\nexport class AppComponent {\n  constructor(private ngxLoaderService: NgxLoaderService) {} // \u003c- use service\n\n  show() {\n    this.ngxLoaderService.show(); // turn on\n  }\n  hide() {\n    this.ngxLoaderService.hide(); // turn off\n  }\n}\n```\n\n## Style change\n\nIf you want to update the style of the loader.\n\n```css\n.ngx-loader-overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100vw;\n  height: 100vh;\n  background: rgba(0, 0, 0, 0.4);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.ngx-loader {\n  width: 50px;\n  height: 50px;\n  border: 6px solid #ccc;\n  border-top-color: #3f51b5;\n  border-radius: 50%;\n  animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n  to {\n    transform: rotate(360deg);\n  }\n}\n```\n\n## Import parameters:\n\n- zIndex - default 10_000.\n\n```\n\u003cngx-loader [zIndex]=\"1000\"\u003e\u003c/ngx-loader\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisicadmir%2Fngx-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnisicadmir%2Fngx-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisicadmir%2Fngx-loader/lists"}