connect/src/app/community/community.service.ts

17 lines
477 B
TypeScript
Raw Normal View History

import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Rx';
@Injectable()
export class CommunityService {
constructor(private http:Http) {
}
getNumberOfPublications() {
return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/publications/count?format=json').map(res => <any> res.json()).do(res => {console.log(res)});
}
}