Add tracking of user's network connectivity.

This commit is contained in:
Spencer Ofwiti
2021-04-02 15:31:10 +03:00
parent d914f6b2b8
commit 0aa1b83ed2
6 changed files with 340 additions and 54 deletions

View File

@@ -1 +1,9 @@
<nav class="navbar navbar-dark bg-dark">
<h1 class="navbar-brand">
<strong *ngIf="noInternetConnection" style="color: red;">OFFLINE </strong>
<img *ngIf="noInternetConnection" width="20rem" src="assets/images/no-wifi.svg" alt="Internet Disconnected">
<strong *ngIf="!noInternetConnection" style="color: lawngreen;">ONLINE </strong>
<img *ngIf="!noInternetConnection" width="20rem" src="assets/images/wifi.svg" alt="Internet Connected">
</h1>
</nav>
<router-outlet (activate)="onResize(mediaQuery)"></router-outlet>