Skip to content

Commit f39eac1

Browse files
committed
added animation spinner and routes sidebar
1 parent 47ee4f3 commit f39eac1

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<div class="row">
22
<div class="col mt-1 time-clock-color">
3-
<!-- fa fa-spin -->
4-
<i class="fas fa-sync-alt "></i>
3+
<i *ngIf="!displayTime" class="fas fa-sync-alt fa fa-spin"></i>
54
</div>
6-
<div class="col time-clock-color">
7-
<h3>{{ hour | number }}:{{ minutes | number }}:{{ seconds | number }}</h3>
5+
<div *ngIf="displayTime" class="col time-clock-color">
6+
<h3>{{ hour | number: '2.0-2' }}:{{ minutes | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}</h3>
87
</div>
98
</div>

src/app/components/shared/clock/clock.component.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,28 @@ export class ClockComponent implements OnInit {
1111
hour: number;
1212
minutes: number;
1313
seconds: number;
14+
displayTime: boolean;
1415

1516
constructor() {
1617
this.currentDate = new Date();
1718
this.hour = this.currentDate.getHours();
1819
this.minutes = this.currentDate.getMinutes();
1920
this.seconds = this.currentDate.getSeconds();
21+
this.displayTime = false;
22+
setTimeout(() => {
23+
this.displayTime = true;
24+
}, 3000);
2025
}
2126

27+
horatTest() {
28+
this.currentDate = new Date();
29+
this.hour = this.currentDate.getHours();
30+
this.minutes = this.currentDate.getMinutes();
31+
this.seconds = this.currentDate.getSeconds();
32+
this.displayTime = false;
33+
setTimeout( 'horatTest()' , 3000);
34+
}
35+
2236

2337
ngOnInit(): void {
2438
}

src/app/components/shared/sidebar/sidebar.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div class="d-flex" id="wrapper">
2-
32
<!-- Sidebar -->
43
<div class="bg-light border-right" id="sidebar-wrapper">
54
<div class="list-group list-group-flush">

0 commit comments

Comments
 (0)