forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
116728: Removed unnecessary *ngVars from the ThumbnailComponent
- Loading branch information
1 parent
404ccd9
commit d31e178
Showing
3 changed files
with
30 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
<div class="thumbnail" [class.limit-width]="limitWidth" *ngVar="(isLoading$ | async) as isLoading"> | ||
<div class="thumbnail" [class.limit-width]="limitWidth"> | ||
<div *ngIf="isLoading" class="thumbnail-content outer"> | ||
<div class="inner"> | ||
<div class="centered"> | ||
<ds-themed-loading [spinner]="true"></ds-themed-loading> | ||
</div> | ||
</div> | ||
</div> | ||
<ng-container *ngVar="(src$ | async) as src"> | ||
<!-- don't use *ngIf="!isLoading" so the thumbnail can load in while the animation is playing --> | ||
<img *ngIf="src !== null" class="thumbnail-content img-fluid" [ngClass]="{'d-none': isLoading}" | ||
[src]="src | dsSafeUrl" [alt]="alt | translate" (error)="errorHandler()" (load)="successHandler()"> | ||
<div *ngIf="src === null && !isLoading" class="thumbnail-content outer"> | ||
<div class="inner"> | ||
<div class="thumbnail-placeholder centered lead"> | ||
{{ placeholder | translate }} | ||
</div> | ||
<!-- don't use *ngIf="!isLoading" so the thumbnail can load in while the animation is playing --> | ||
<img *ngIf="src !== null" class="thumbnail-content img-fluid" [ngClass]="{'d-none': isLoading}" | ||
[src]="src | dsSafeUrl" [alt]="alt | translate" (error)="errorHandler()" (load)="successHandler()"> | ||
<div *ngIf="src === null && !isLoading" class="thumbnail-content outer"> | ||
<div class="inner"> | ||
<div class="thumbnail-placeholder centered lead"> | ||
{{ placeholder | translate }} | ||
</div> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters