1 import {Directive, Input, Host, OnInit} from '@angular/core';
2 import {MarcSimplifiedEditorFieldDirective} from './simplified-editor-field.directive';
5 * A subfield that a user can edit, which will later be
10 selector: 'eg-marc-simplified-editor-subfield',
12 export class MarcSimplifiedEditorSubfieldDirective implements OnInit {
14 @Input() code: string;
15 @Input() defaultValue: string;
17 constructor(@Host() private field: MarcSimplifiedEditorFieldDirective) {}
20 this.field.addSubfield(this.code, this.defaultValue);