import {Injectable} from '@angular/core'; import {Http} from '@angular/http'; import{EnvProperties} from '../../utils/properties/env-properties'; @Injectable() export class SearchCommunityProjectsService { constructor(private http: Http ) {} searchProjects (properties:EnvProperties, communityId: string):any { let url = properties.communityAPI+communityId+"/projects"; return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) .map(res => res.json()) } }