Project

General

Profile

« Previous | Next » 

Revision 55971

[Connect|Trunk]

Merge into trunk branch angular7 rev 55968

View differences:

htmlPage.service.ts
1 1
import {Injectable, Inject} from '@angular/core';
2
import {Http, Response} from '@angular/http';
2
import {HttpClient} from "@angular/common/http";
3 3
import {Observable}     from 'rxjs/Observable';
4 4
import 'rxjs/add/observable/of';
5 5
import 'rxjs/add/operator/do';
......
8 8

  
9 9
@Injectable()
10 10
export class HtmlPageService {
11
    constructor(private http: Http) {}
11
    constructor(private http: HttpClient) {}
12 12

  
13 13
    getHtmlContent (router: string, properties:EnvProperties, communityId:string ):any {
14 14
        //console.info("get router html content for : "+router);
15 15

  
16 16
        let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+router;
17 17

  
18
        return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
19
                    .map(res => <Array<any>> res.json());
18
        return this.http.get<Array<any>>((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
19
                    //.map(res => <Array<any>> res.json());
20 20

  
21 21
    }
22 22

  

Also available in: Unified diff