Project

General

Profile

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