{"id":21471944,"url":"https://github.com/theideasaler/ngx-http-get-shell","last_synced_at":"2026-05-09T16:50:58.000Z","repository":{"id":39815374,"uuid":"507206980","full_name":"theideasaler/ngx-http-get-shell","owner":"theideasaler","description":"ngx-http-get-shell is a lightweight angular component which encapsulate GETs and client-side cache solution.","archived":false,"fork":false,"pushed_at":"2022-12-19T12:23:57.000Z","size":402,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T15:18:23.668Z","etag":null,"topics":["angular","http-shell","optimization","rest-api","software-engineering","webdevelopment"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ngx-http-get-shell","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/theideasaler.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}},"created_at":"2022-06-25T03:50:56.000Z","updated_at":"2022-06-27T13:47:32.000Z","dependencies_parsed_at":"2023-01-29T21:30:42.434Z","dependency_job_id":null,"html_url":"https://github.com/theideasaler/ngx-http-get-shell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theideasaler%2Fngx-http-get-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theideasaler%2Fngx-http-get-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theideasaler%2Fngx-http-get-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theideasaler%2Fngx-http-get-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theideasaler","download_url":"https://codeload.github.com/theideasaler/ngx-http-get-shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989714,"owners_count":20379648,"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","http-shell","optimization","rest-api","software-engineering","webdevelopment"],"created_at":"2024-11-23T09:46:41.074Z","updated_at":"2025-10-04T00:49:30.803Z","avatar_url":"https://github.com/theideasaler.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx-http-get-shell\n\nA lightweight Angular GET shell component to help reduce creating repetitive code of HttpClient GET APIs. This component has built-in support for **client-side cache** storage supported by IndexedDB.\n\n## Installation\n\nInstall the npm package.\n```\n  npm i ngx-http-get-shell\n```\nImport it into your root AppModule:\n```ts\n  import { NgxHttpGetShellModule } from 'ngx-http-get-shell';\n\n@NgModule({\n  imports: [\n    ...\n    NgxHttpGetShellModule.forRoot(),\n    ...\n  ],\n})\nexport class AppModule { }\n```\n\n## Usage\nThis library is super easy-to-use, all you need is to pass the `url` you want to get data from into `ngx-http-get-shell`, The url could be **absolute HTTP URL** or a **relative url** of your static files.\n\n```html\n\u003cngx-http-get-shell url=\"https://api.github.com/users/theideasaler\" [maxStale]=\"1000\" [templateRef]=\"githubTmpl\"\u003e\n  \u003cng-template #githubTmpl let-data\u003e\n    {{ data | json }}\n  \u003c/ng-template\u003e\n\u003c/ngx-http-get-shell\u003e\n\n\u003cngx-http-get-shell url=\"/assets/test.json\" [maxStale]=\"3000\" [templateRef]=\"staticTmpl\"\u003e\n  \u003cng-template #staticTmpl let-file\u003e\n    \u003cdiv class=\"some wrapper elements\"\u003e\n      {{file | json}}\n    \u003c/div\u003e\n  \u003c/ng-template\u003e\n\u003c/ngx-http-get-shell\u003e\n```\n\n\n## NgxHttpGetShellComponent\n`NgxHttpGetShellComponent` exposes some I/O for custom configuration.\n\n| I/O | name | type | description |\n|------|------|---------|-------------|\n| @Input | url | string |  The URL to fetch data from. It will be used as the key from the cache. |\n| @Input | maxStale | number | Max Stale duration in milliseconds, default is 0, which means no cache. |\n| @Input | templateRef | TemplateRef | The template reference will be used to take the fetched and processed data. |\n| @Input | dataProcessor | Function | The processor for the fetched data before it is emitted. |\n| @Input | errorHandler | Function | The error handler for the data fetching. |\n| @Output | dataLoaded | EventEmitter | Emitted when the data is loaded and processed. You can use this for your custom data handling. |\n\n## IndexedDbService\nThis library also exposes `IndexedDbService` for you so that you can have more control of the indexedDB for your caching.\n\n| method | type | description |\n|------|---------|-------------|\n| cleanup | static | Cleans up the database by removing expired items. This method will be called when `NgxHttpGetShellModule` is initialized. |\n| setItem | instance | Adds an item to the database. |\n| getItem | instance | Gets an item from the database |\n| removeItem | instance | Deletes an item from the database |\n| clearAll | instance | Clear all items from the database |\n| getDb | instance | The the indexed db instance used by this service |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheideasaler%2Fngx-http-get-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheideasaler%2Fngx-http-get-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheideasaler%2Fngx-http-get-shell/lists"}