Files
dspace-angular/src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts
2022-09-27 17:40:58 +02:00

42 lines
981 B
TypeScript

import { Component, Input } from '@angular/core';
import { Item } from '../../../../core/shared/item.model';
/**
* This component can be used to represent metadata on a simple item page.
* It expects one input parameter of type Item to which the metadata belongs.
* This class can be extended to print certain metadata.
*/
@Component({
templateUrl: './item-page-field.component.html'
})
export class ItemPageFieldComponent {
/**
* The item to display metadata for
*/
@Input() item: Item;
/**
* Whether the {@link MarkdownPipe} should be used to render this metadata.
*/
enableMarkdown = false;
/**
* Fields (schema.element.qualifier) used to render their values.
*/
fields: string[];
/**
* Label i18n key for the rendered metadata
*/
label: string;
/**
* Separator string between multiple values of the metadata fields defined
* @type {string}
*/
separator = '<br/>';
}