Revision 56051
Added by Argiro Kokogiannaki almost 5 years ago
searchProjects.service.ts | ||
---|---|---|
2 | 2 |
import {Http} from '@angular/http'; |
3 | 3 |
import {HttpClient} from "@angular/common/http"; |
4 | 4 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
5 |
import {map} from "rxjs/operators"; |
|
5 | 6 |
|
6 | 7 |
@Injectable() |
7 | 8 |
export class SearchCommunityProjectsService { |
... | ... | |
13 | 14 |
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url); |
14 | 15 |
//.map(res => <any> res.json()) |
15 | 16 |
} |
17 |
countTotalProjects(properties:EnvProperties,communityId:string) { |
|
18 |
let url = properties.communityAPI+communityId+"/projects"; |
|
19 |
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url) |
|
20 |
.pipe(map(res => res['length'])); |
|
21 |
} |
|
16 | 22 |
} |
Also available in: Unified diff
[Library|newlinking]
Merging trunk|library into branch newlinking 55972:56049