This package has been deprecated

Author message:

This package no longer supported. replaced by the new package ngoffline2

@devtips/ngoffline
TypeScript icon, indicating that this package has built-in type declarations

12.3.12 • Public • Published

MyWorkspace

This project was generated with Angular CLI version 12.2.10.

Table of Contents

About

this package used to detect offline and online status and show or hide messages based on network status

Imports

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    ...
    NgofflineModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Usage

<ngoffline></ngoffline>

The default message is 'You are not connected', but you can change it

<ngoffline message="Custom message"></ngoffline>

You can use directive to display or hide any html selector

<div ngoffline>
  this message will be displayed only if the status is offline
</div>

Network status output return 'false' if the status Offline

<ngoffline (isOnline)="checkNetworkStatus($event)"></ngoffline>

Or in the directive

<div ngoffline (isOnline)="checkNetworkStatus($event)">
  this message will be displayed only if the status is offline
</div>

Package Sidebar

Install

npm i @devtips/ngoffline

Weekly Downloads

5

Version

12.3.12

License

MIT

Unpacked Size

249 kB

Total Files

14

Last publish

Collaborators

  • devtips