We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f67f5 commit 020fad5Copy full SHA for 020fad5
06-cmp-deep-dive/01-starting-project/src/app/dashboard/server-status/server-status.component.ts
@@ -16,9 +16,10 @@ export class ServerStatusComponent implements OnInit {
16
constructor() {}
17
18
checkServerStatus() {
19
- if (Math.random() < 0.5) {
+ const randomValue = Math.random();
20
+ if (randomValue < 0.5) {
21
this.currentStatus.set('online');
- } else if(Math.random() < 0.9) {
22
+ } else if (randomValue < 0.9) {
23
this.currentStatus.set('offline');
24
} else {
25
this.currentStatus.set('unknown');
0 commit comments