Skip to content

Commit

Permalink
fix: hide loading when content is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
daneisburgh committed Nov 7, 2021
1 parent 845474e commit 56a632c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ hr {
z-index: 0;
}

#app-content,
#loading-content.is-content-ready {
#app-content {
opacity: 0;
}

#app-content.is-content-ready,
#loading-content {
#app-content.is-content-ready {
opacity: 1;
}

Expand Down
3 changes: 1 addition & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<div
*ngIf="!isError"
*ngIf="!isContentReady && !isError"
id="loading-content"
class="position-fixed vh-100 vw-100 d-flex align-items-center justify-content-center pb-4"
[ngClass]="{ 'is-content-ready': isError || isContentReady }"
>
<div class="spinner-border" role="status"></div>
</div>
Expand Down

0 comments on commit 56a632c

Please sign in to comment.