import {Component} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; @Component({ selector: 'openaire-linking-generic', template: `` }) export class OpenaireLinkingComponent { communityId:string; constructor (private route: ActivatedRoute) { this.route.data .subscribe((data: { envSpecific: any }) => { this.route.queryParams.subscribe( communityId => { this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain); if(!this.communityId) { this.communityId = communityId['communityId']; } }); }); } }