{"id":28137103,"url":"https://github.com/navneetlal/ng-offline","last_synced_at":"2026-05-20T14:04:47.031Z","repository":{"id":38622673,"uuid":"235995052","full_name":"navneetlal/ng-offline","owner":"navneetlal","description":"Angular directive which checks whether network connectivity is available or not.","archived":false,"fork":false,"pushed_at":"2023-01-07T14:04:57.000Z","size":3722,"stargazers_count":0,"open_issues_count":27,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T06:58:34.194Z","etag":null,"topics":["angular","directive","library","network-connection","offline"],"latest_commit_sha":null,"homepage":"","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/navneetlal.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":"2020-01-24T12:00:52.000Z","updated_at":"2020-06-22T09:45:19.000Z","dependencies_parsed_at":"2023-02-07T09:01:21.751Z","dependency_job_id":null,"html_url":"https://github.com/navneetlal/ng-offline","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/navneetlal%2Fng-offline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navneetlal%2Fng-offline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navneetlal%2Fng-offline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navneetlal%2Fng-offline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navneetlal","download_url":"https://codeload.github.com/navneetlal/ng-offline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254180015,"owners_count":22027915,"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","directive","library","network-connection","offline"],"created_at":"2025-05-14T16:21:08.914Z","updated_at":"2026-05-20T14:04:41.998Z","avatar_url":"https://github.com/navneetlal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub license](https://img.shields.io/github/license/navneetlal/ng-offline?style=flat-square)](https://github.com/navneetlal/ng-offline/blob/master/LICENSE)\n![npm](https://img.shields.io/npm/v/ng-offline?color=blue\u0026style=flat-square)\n\n# NgOffline\nA simple angular module which enables directives `ngOnline` and `ngOffline` to make conditional rendering of component based on network status.\n\n### Installing\n\n```bash\n$ npm install ng-offline --save\n```\n\n### Basic usage\nImport `NgOfflineModule` into your ngModule and start using directives `ngOnline` and `ngOffline` within your html component.\n\n##### **`app.module.ts`**\n```ts\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { NgOfflineModule } from 'ng-offline';\n\nimport { AppComponent } from './app.component';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    NgOfflineModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n##### **`app.component.html`**\n```html\n\u003cdiv ngOnline\u003eHey! You are online\u003c/div\u003e\n\u003cdiv ngOffline\u003eYou're offline. Check your connection!\u003c/div\u003e\n```\n\nFirst div container will only be visible when network status in online and second div will be visible after network status in offline.\n\n### License\nPublished under the [MIT License](https://github.com/navneetlal/react-offline-component/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavneetlal%2Fng-offline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavneetlal%2Fng-offline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavneetlal%2Fng-offline/lists"}