Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added animation spinner and routes sidebar
  • Loading branch information
daros10 committed Mar 11, 2020
commit f39eac15d44ed943926f118a99098b2d41e47fd6
7 changes: 3 additions & 4 deletions src/app/components/shared/clock/clock.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<div class="row">
<div class="col mt-1 time-clock-color">
<!-- fa fa-spin -->
<i class="fas fa-sync-alt "></i>
<i *ngIf="!displayTime" class="fas fa-sync-alt fa fa-spin"></i>
</div>
<div class="col time-clock-color">
<h3>{{ hour | number }}:{{ minutes | number }}:{{ seconds | number }}</h3>
<div *ngIf="displayTime" class="col time-clock-color">
<h3>{{ hour | number: '2.0-2' }}:{{ minutes | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}</h3>
</div>
</div>
14 changes: 14 additions & 0 deletions src/app/components/shared/clock/clock.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,28 @@ export class ClockComponent implements OnInit {
hour: number;
minutes: number;
seconds: number;
displayTime: boolean;

constructor() {
this.currentDate = new Date();
this.hour = this.currentDate.getHours();
this.minutes = this.currentDate.getMinutes();
this.seconds = this.currentDate.getSeconds();
this.displayTime = false;
setTimeout(() => {
this.displayTime = true;
}, 3000);
}

horatTest() {
this.currentDate = new Date();
this.hour = this.currentDate.getHours();
this.minutes = this.currentDate.getMinutes();
this.seconds = this.currentDate.getSeconds();
this.displayTime = false;
setTimeout( 'horatTest()' , 3000);
}


ngOnInit(): void {
}
Expand Down
1 change: 0 additions & 1 deletion src/app/components/shared/sidebar/sidebar.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<div class="d-flex" id="wrapper">

<!-- Sidebar -->
<div class="bg-light border-right" id="sidebar-wrapper">
<div class="list-group list-group-flush">
Expand Down