import {Component, Input} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {EnvProperties} from '../../utils/properties/env-properties'; import {ZenodoInformationClass} from '../utils/zenodoInformation.class'; @Component({ selector: 'deposit-datasets-result', template: ` ` }) export class DepositDatasetsResultComponent { @Input() zenodoInformation: ZenodoInformationClass; properties:EnvProperties; @Input() piwikSiteId = null; constructor (private route: ActivatedRoute) {} ngOnInit() { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; if(!this.zenodoInformation) { this.zenodoInformation = new ZenodoInformationClass(); } if(!this.zenodoInformation.url) { this.zenodoInformation.url = this.properties.zenodo; } if(!this.zenodoInformation.name) { this.zenodoInformation.name = "Zenodo"; } }); } }