diff --git a/src/app/communities/communities.service.ts b/src/app/communities/communities.service.ts index ce24476..3398244 100644 --- a/src/app/communities/communities.service.ts +++ b/src/app/communities/communities.service.ts @@ -46,6 +46,20 @@ export class CommunitiesService { } } + if(resData[0].subjects != null) { + if(result['subjects'] == undefined) { + result['subjects'] = new Array(); + } + + let subjects = resData[0].subjects; + let length = Array.isArray(subjects) ? subjects.length : 1; + + for(let i=0; i(); + } + + let subjects = resData.subjects; + let length = Array.isArray(subjects) ? subjects.length : 1; + + for(let i=0; i {{community.description}}

-

Nature Life science Environment

-
-

Curated by: {{manager}} Created: 26-01-2018

+
+

{{subject}} 

+

+ Curated by: {{manager}} + + Created: 26-01-2018 +

diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index 5fa1d8b..6556801 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -84,7 +84,7 @@ export class CommunityComponent { community => { this.community = community; this.params = {community: encodeURIComponent('"'+community.queryId+'"')}; - //console.log(community); + console.log(community); }); this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications/count?format=json&fq=communityid='+this.communityId).subscribe( diff --git a/src/app/community/community.service.ts b/src/app/community/community.service.ts index 90e961e..994b0ae 100644 --- a/src/app/community/community.service.ts +++ b/src/app/community/community.service.ts @@ -112,7 +112,6 @@ export class CommunityService { community['description'] = resData[0].description; if(resData[0].managers != null) { - if(community['managers'] == undefined) { community['managers'] = new Array(); } @@ -126,6 +125,20 @@ export class CommunityService { } } + if(resData[0].subjects != null) { + if(community['subjects'] == undefined) { + community['subjects'] = new Array(); + } + + let subjects = resData[0].subjects; + let length = Array.isArray(subjects) ? subjects.length : 1; + + for(let i=0; i(); + } + + let subjects = resData.subjects; + let length = Array.isArray(subjects) ? subjects.length : 1; + + for(let i=0; i