Problem at http request to a rest api in ionic 2


I encountered a problem to http request a rest api in ionic 2.

Here is my code:

this.http.get('http://localhost:3000/news').subscribe(res => { = res.json()

But got the follow error message

Can anybody advise? Thanks.


Try the Rxjs map to map the res.json() before the subscribe.