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.
Merge pull request DSpace#3221 from alexandrevryghem/w2p-116728_remov…
…ed-unnecessary-ngvars_contribute-main Removed unnecessary *ngVars from ThumbnailComponent
- Loading branch information
Showing
3 changed files
with
30 additions
and
35 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-loading [spinner]="true"></ds-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