import {Component, ElementRef, Input} from '@angular/core'; import { OpenAireJsonldConverterService } from './service/open-aire-jsonld-converter.service'; import { JsonldDocumentSerializerService } from './service/jsonld-document-serializer.service'; @Component({ selector: 'schema2jsonld', template: ` ` }) export class Schema2jsonldComponent { @Input() data; @Input() URL; json; constructor( private documentParser: OpenAireJsonldConverterService, private documentSerializer: JsonldDocumentSerializerService) { } ngOnInit() { const docOvject = this.documentParser.convertPublication(this.data, this.URL); this.json = this.documentSerializer.serialize(docOvject); } }