32 lines
1011 B
TypeScript
32 lines
1011 B
TypeScript
|
|
||
|
import { Component, ViewChild, OnInit } from '@angular/core';
|
||
|
import { ActivatedRoute } from '@angular/router';
|
||
|
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'claims',
|
||
|
template: ` <claims-admin fetchBy="Context" [fetchId]=communityPid [isConnect]="true" [claimsInfoURL]=claimsInfoURL [moreClaimsURL]="'https://beta.'+communityPid+'.openaire.eu/participate/claim'">
|
||
|
</claims-admin>`,
|
||
|
})
|
||
|
|
||
|
export class ClaimsComponent implements OnInit {
|
||
|
|
||
|
communityPid:string;
|
||
|
claimsInfoURL:string;
|
||
|
|
||
|
ngOnInit() {
|
||
|
|
||
|
this.route.queryParams.subscribe(params => {
|
||
|
this.communityPid = params['communityId'];
|
||
|
|
||
|
});
|
||
|
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||
|
this.claimsInfoURL = data.envSpecific.claimsInformationLink;
|
||
|
console.log(this.claimsInfoURL);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
constructor(private route: ActivatedRoute) {}
|
||
|
|
||
|
}
|