openaire-library/landingPages/annotation/annotation.service.ts

19 lines
569 B
TypeScript

import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
@Injectable({
providedIn: "root"
})
export class AnnotationService {
constructor(private http: HttpClient) {
}
getAnnotations(annotation: any): Observable<any> {
return this.http.get('https://b2note.eudat.eu/interface_main.html?recordurl_tofeed=' +
encodeURIComponent(annotation.get('recordurl_tofeed').value) + '&pid_tofeed='
+ encodeURIComponent(annotation.get('pid_tofeed').value));
}
}