1
|
import {Injectable} from '@angular/core';
|
2
|
import {Http} from '@angular/http';
|
3
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
4
|
|
5
|
@Injectable()
|
6
|
export class SearchCommunityProjectsService {
|
7
|
constructor(private http: Http ) {}
|
8
|
|
9
|
searchProjects (properties:EnvProperties, communityId: string):any {
|
10
|
let url = properties.communityAPI+communityId+"/projects";
|
11
|
|
12
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
13
|
.map(res => <any> res.json())
|
14
|
}
|
15
|
}
|