import {Component, Input} from '@angular/core'; import {LocaleService} from './i18n'; @Component({ selector: 'field-readonly', template: `
{{value}}
`, styles: [`.readonly .mat-input-element { margin-top: 0px !important; color: rgba(0, 0, 0, 0.50); }`, `.readonly .mat-input-element { margin-top: 0px; color: rgba(0, 0, 0, 0.50); }`, `.readonly.mat-input-container { width: 100%; }`] }) export class FieldReadonlyComponent { @Input('value') value: any; private _label : string; @Input('label') set label(txt: string) { this._label = this.$L.get(txt); } get label(): string { return this._label; } constructor(private $L : LocaleService) { } }