Skip to content

SandeepBalachandran/ngx-sand-internet-status

Repository files navigation

ngx-sand-internet-status

An angular internet status checker


GitHub release GitHub last commit GitHub issues GitHub pull requests
ESLint ESLint ESLint Codesize Top Language


Demo

Table of contents

Features

Goto Top

Getting Started

Step 1 : Install the package

NPM

npm install ngx-sand-internet-status

Step 2 : After installation import into your root or feature module

import { NgxInternetStatusModule } from 'ngx-internet-status'

Step 3 : Add NgxInternetStatusModule to the imports of your NgModule

@NgModule({
  imports: [
    ...,
    NgxInternetStatusModule
    
  ],
  ...
})
class YourModule { ... }

Step 4: After installation import service into your module

import { NgxInternetStatusService } from "ngx-sand-internet-status";

Step 5 : Add NgxInternetStatusService to the providers of your NgModule

@NgModule({
  providers: [
    ...,
    NgxInternetStatusService
  ],
  ...
})
class YourModule { ... }

Usage

  • Use in your templates to add the default dropdown in your view like below

Goto Top

API

Input

  • settings:Object - Settings object to change the default configurations.
 settings = {
   type :'banner',
   onlineTitle:'Seems good',
   offlineTitle:'Connection error',
   onlineText:'Hurray! You are back online',
   offlineText:'Oops! Looks like you are offline',
 }

Output

Goto Top

Help Improve

Found a bug or an issue with this? Open a new issue here on GitHub.

Contribute

Please check the Contributing Guidelines before contributing.

This project was generated with Angular CLI version 10.0.5.