Project

General

Profile

« Previous | Next » 

Revision 55573

[angular7: Library]: Move uoa-services-library project to Angular 7 (using webpack)

View differences:

searchProjects.service.ts
1 1
import {Injectable} from '@angular/core';
2 2
import {Http} from '@angular/http';
3
import {HttpClient} from "@angular/common/http";
3 4
import{EnvProperties} from '../../utils/properties/env-properties';
4 5

  
5 6
@Injectable()
6 7
export class SearchCommunityProjectsService {
7
    constructor(private http: Http ) {}
8
    constructor(private http: HttpClient ) {}
8 9

  
9 10
    searchProjects (properties:EnvProperties, communityId: string):any {
10 11
        let url = properties.communityAPI+communityId+"/projects";
11 12

  
12
        return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
13
                    .map(res => <any> res.json())
13
        return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
14
                    //.map(res => <any> res.json())
14 15
    }
15 16
}

Also available in: Unified diff