Browse Source
Update Internet-Connection-Service.md
pull/17054/head
Sinan Öztürk
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
docs/en/UI/Angular/Internet-Connection-Service.md
|
|
@ -14,14 +14,14 @@ When you inject InternetConnectionService you can get the current internet statu |
|
|
|
|
|
|
|
|
**You can get via signal** |
|
|
**You can get via signal** |
|
|
```ts |
|
|
```ts |
|
|
class someComponent{ |
|
|
class SomeComponent{ |
|
|
internetConnectionService = inject(InternetConnectionService); |
|
|
internetConnectionService = inject(InternetConnectionService); |
|
|
isOnline = this.internetConnectionService.networkStatus |
|
|
isOnline = this.internetConnectionService.networkStatus |
|
|
} |
|
|
} |
|
|
``` |
|
|
``` |
|
|
**or you can get as observable** |
|
|
**or you can get as observable** |
|
|
```ts |
|
|
```ts |
|
|
class someComponent{ |
|
|
class SomeComponent{ |
|
|
internetConnectionService = inject(InternetConnectionService); |
|
|
internetConnectionService = inject(InternetConnectionService); |
|
|
isOnline = this.internetConnectionService.networkStatus$ |
|
|
isOnline = this.internetConnectionService.networkStatus$ |
|
|
} |
|
|
} |
|
|
|