21 lines
606 B
TypeScript
21 lines
606 B
TypeScript
import { Component, Input, ViewChild, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'scn-metadata-value',
|
|
standalone: true,
|
|
encapsulation: ViewEncapsulation.None,
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
template: `
|
|
<ng-template #contentTemplate><ng-content></ng-content></ng-template>
|
|
`,
|
|
})
|
|
export class MetadataValueComponent {
|
|
@Input() label: string = '';
|
|
|
|
@ViewChild('contentTemplate', { static: true }) contentTemplate!: TemplateRef<any>;
|
|
|
|
get content(): TemplateRef<any> {
|
|
return this.contentTemplate;
|
|
}
|
|
}
|