aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/carousel
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_elements/carousel')
-rw-r--r--frontend/src/app/_elements/carousel/carousel.component.html5
-rw-r--r--frontend/src/app/_elements/carousel/carousel.component.ts1
2 files changed, 5 insertions, 1 deletions
diff --git a/frontend/src/app/_elements/carousel/carousel.component.html b/frontend/src/app/_elements/carousel/carousel.component.html
index 755899a7..eb1041ce 100644
--- a/frontend/src/app/_elements/carousel/carousel.component.html
+++ b/frontend/src/app/_elements/carousel/carousel.component.html
@@ -1,6 +1,9 @@
<div class="container">
<div class="row d-flex align-items-stretch flex-row mx-5 align-items-stretch">
- <div class="col my-1" *ngFor=" let item of items" [ngSwitch]="item.constructor.name">
+ <div class="col my-1" *ngFor="let item of items" [ngSwitch]="type">
+ <ng-template ngSwitchCase="Object">
+ Unknown item type
+ </ng-template>
<ng-template ngSwitchCase="Dataset">
<app-item-dataset [dataset]="item">
</app-item-dataset>
diff --git a/frontend/src/app/_elements/carousel/carousel.component.ts b/frontend/src/app/_elements/carousel/carousel.component.ts
index ed4fa4a5..e0112121 100644
--- a/frontend/src/app/_elements/carousel/carousel.component.ts
+++ b/frontend/src/app/_elements/carousel/carousel.component.ts
@@ -8,6 +8,7 @@ import { Component, Input, OnInit } from '@angular/core';
export class CarouselComponent {
@Input() items: any[] = [];
+ @Input() type: string = "Object";
constructor() { }