display.component.ts 559 B

123456789101112131415161718192021222324
  1. import { Component, Input, OnChanges } from '@angular/core';
  2. import { ILink } from '../../../models/field.model';
  3. @Component({
  4. selector: 'app-display',
  5. templateUrl: './display.component.html',
  6. styleUrls: ['./display.component.scss']
  7. })
  8. export class DisplayComponent implements OnChanges {
  9. @Input()
  10. meta: StringMap<any>;
  11. value: string;
  12. link?: ILink;
  13. readonly componentName = 'DisplayComponent'; // For AOT compatibility, as class names don't survice minification
  14. ngOnChanges() {
  15. this.value = this.meta.value;
  16. this.link = this.meta.link;
  17. }
  18. }