From ccfa9f5ab917c26cf5c3648c96f8a00ec6f1dd1b Mon Sep 17 00:00:00 2001 From: "sofia.baltzi" Date: Tue, 27 Feb 2018 11:37:18 +0000 Subject: [PATCH] Get query param for communityId git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50941 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/community/community.component.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index 177cae9..e342bd0 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -66,6 +66,7 @@ export class CommunityComponent { } }); + this._communityService.getNumberOfPublications().subscribe( publicationTotal => { this.publicationTotal = publicationTotal; @@ -75,33 +76,37 @@ export class CommunityComponent { this._communityService.getNumberOfResearchData().subscribe( researchDataTotal => { this.researchDataTotal = researchDataTotal; - //console.log(reasearchData); }); this._communityService.getNumberOfSoftware().subscribe( softwareTotal => { this.softwareTotal = softwareTotal; - //console.log(software); }); this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications?fq=communityid%20exact%20%22egi%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe( publicationResults => { this.publicationResults = publicationResults; - //console.log(publicationResults); }); this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets?fq=communityid%20exact%20%22egi%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe( researchDataResults => { this.researchDataResults = researchDataResults; - console.log(researchDataResults); }); this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/software?fq=communityid%20exact%20%22egi%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe( softwareResults => { this.softwareResults = softwareResults; - //console.log(softwareResults); }); + + this.route.queryParams + .subscribe(params => { + let communityId = params['communityId']; + console.log(communityId); + }); + } + + public ngOnDestroy() { if(this.piwiksub){ this.piwiksub.unsubscribe();