From 7a957593948a89317d960ad6ac7f4bb0449308e0 Mon Sep 17 00:00:00 2001 From: "sofia.baltzi" Date: Mon, 29 Jan 2018 14:31:10 +0000 Subject: [PATCH] Get number of publications from rudie's json git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50447 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.module.ts | 4 +++- src/app/community/community.component.html | 2 +- src/app/community/community.component.ts | 11 +++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4397835..adffd5d 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -12,6 +12,8 @@ import {NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, Erro import { OpenaireErrorPageComponent } from './error/errorPage.component'; +import { CommunityService } from './community/community.service'; + @NgModule({ imports: [ @@ -72,7 +74,7 @@ NavigationBarModule, FeedbackModule, BottomModule, ], declarations: [ AppComponent, OpenaireErrorPageComponent], exports: [ AppComponent ], - providers:[ ], + providers:[ CommunityService ], bootstrap: [AppComponent] }) // diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index 8be4650..970c0a6 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -12,7 +12,7 @@
diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index ee0eab4..eacc2a9 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -7,6 +7,7 @@ import { Meta, MetaDefinition, ConfigurationService} from 'ng-openaire-library'; import { ErrorCodes, RouterHelper, PiwikService} from 'ng-openaire-library'; import {Properties} from '../utils/properties'; +import {CommunityService} from "./community.service"; @Component({ @@ -19,13 +20,14 @@ export class CommunityComponent { public pageTitle = "OpenAIRE" - + public res=[]; constructor ( private route: ActivatedRoute, private _router: Router, private location: Location, private _meta: Meta,private _piwikService:PiwikService, - private config: ConfigurationService + private config: ConfigurationService, + private _communityService:CommunityService ) { var description = "open access, research, scientific publication, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects "; @@ -47,6 +49,11 @@ export class CommunityComponent { } public ngOnInit() { + this._communityService.getNumberOfPublications().subscribe( + res => { + this.res = res; + console.log(res); + }); } public ngOnDestroy() { if(this.piwiksub){