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){