diff --git a/app/pages/community/community-edit-form.component.html b/app/pages/community/community-edit-form.component.html index 75177b6..8a85b34 100644 --- a/app/pages/community/community-edit-form.component.html +++ b/app/pages/community/community-edit-form.component.html @@ -12,6 +12,15 @@ +

Available data providers:

+ + + + diff --git a/app/pages/community/community-edit-form.component.ts b/app/pages/community/community-edit-form.component.ts index 7355708..27d1727 100644 --- a/app/pages/community/community-edit-form.component.ts +++ b/app/pages/community/community-edit-form.component.ts @@ -14,9 +14,18 @@ export class CommunityEditFormComponent implements OnInit{ public errorMessage: string; + public res=[]; + constructor(public _fb: FormBuilder, private _helpContentService: HelpContentService){} - ngOnInit(): void {} + + ngOnInit(){ + this._helpContentService.getDataProviders().subscribe( + res => { + this.res = res; + console.log(res); + }); + } public get form() { return this._fb.group({ diff --git a/app/services/help-content.service.ts b/app/services/help-content.service.ts index 4cc408b..b8843b8 100644 --- a/app/services/help-content.service.ts +++ b/app/services/help-content.service.ts @@ -276,4 +276,9 @@ export class HelpContentService { return Observable.throw(error.json().error || 'Server error'); } + getDataProviders() { + //return this.http.get('https://beta.services.openaire.eu/search/v2/api/datasources?format=json').map(res => res.json()).map(res => res.results).do(res => {console.log(res)}).catch(this.handleError); + return this.http.get('https://beta.services.openaire.eu/search/v2/api/datasources?format=json').map(res => res.json()).map(res => res.results).do(res => {console.log(res)}).catch(this.handleError); + } + }