docs/en/framework/ui/angular/internet-connection-service.md
//[doc-seo]
{
"Description": "Learn how to use the `InternetConnectionService` to easily check and respond to internet connectivity status in your ABP applications."
}
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
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:
İt'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