With HttpModule I used this code to get data from Express.js REST API:
getArticles() {
this.http.get('http://localhost:3000/api/articles')
.map(res => res.json()).subscribe(res => this.articles = res);
}
After that I would display the result in the template using binding.
Now, with HttpClientModule, I can't figure out how to do that. The documentation suggests using something like
this.httpClient.get('http://localhost:3000/api/articles')
.subscribe(data => { this.results = data['results']; });
But it doesn't work.