diff options
author | KAPIL SINGAL <ks220y@att.com> | 2021-01-14 04:21:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-01-14 04:21:41 +0000 |
commit | 424fcd63ca57bd8cfa8b46001021c29e020a8a6d (patch) | |
tree | a01ea339509880ea337ef4290eba008af964766b /cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts | |
parent | cae13f9196921c1b854d2f199db4dfbdd5868a62 (diff) | |
parent | 50b86c6a59e2a65c4a2ff5c97997bba21da6a98b (diff) |
Merge "enable 2-way binding between metadata and editor tabs"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts index 63725a228..a55159ad5 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts @@ -17,6 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ +import { JsonPipe } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { DictionaryCreationService } from '../dictionary-creation.service'; import { DictionaryCreationStore } from '../dictionary-creation.store'; @@ -30,11 +31,17 @@ export class DictionaryEditorComponent implements OnInit { text = ''; constructor( private dictionaryStore: DictionaryCreationStore, - private dictionaryService: DictionaryCreationService + private dictionaryService: DictionaryCreationService, + private pipe: JsonPipe ) { } ngOnInit() { + this.dictionaryStore.state$.subscribe(element => { + if (element && element.metaData) { + this.text = this.pipe.transform(element.metaData); + } + }); } textChanged(event) { |