Filter by title

Internet Connection Service

InternetConnectionService is a service which is exposed by the @abp/ng.core package. You can use this service in order to check your internet connection

Getting Started

When you inject the InternetConnectionService you can get the current internet status, and it gets immediately updated if the status changes.

InternetConnectionService provides two choices to catch the network status:

  1. Signal (readonly)
  2. Observable

How To Use

It's easy, just inject the service and get the network status.

You can get via signal

class SomeComponent{
 internetConnectionService = inject(InternetConnectionService);
 isOnline = this.internetConnectionService.networkStatus
}

or you can get the observable

class SomeComponent{
 internetConnectionService = inject(InternetConnectionService);
 isOnline = this.internetConnectionService.networkStatus$
}

To see how we implement to the template, check the InternetConnectionStatusComponent

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

ABP Community Talks
Low-Code, High Precision
13 Aug, 17:00
Online
Watch the Event
ABP Live Webinar
Webinar Calendar Webinar Calendar
Discover
ABP Platform
Register Now
Oct 01
Thursday,
17:00 UTC
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.