After calling this function to retrieve an array of Articles, I noticed that the data is not being saved as expected. Take a look at my console output below.
GetAll() {
//return this.http.get<Array<Article>>(this.cfg.SERVER);
this.http.get(this.cfg.SERVER)
.subscribe((data: Array<Article>) => {
this.articles = data;
console.log(1);
console.log(this.articles);
}
);
console.log(2);
console.log(this.articles);
return this.articles;
}