Well, I spent a lot of time looking for help for this problem but nothing worked for me. I'm getting an Array of Objects from my provider:
this.encarteProvider.getProdutosEncarte('encarte1').subscribe(prods => {
this.produtos = prods;
console.log(this.produtos);
});
In console, it shows:
[]
0: Produto
1: Produto
2: Produto
length: 3
__proto__: Array(0)
If I try this.produtos.forEach(produto => ...), it does not show me nothing, because the Array is empty. I think it's because the data is get asynchronously and (like the Chrome's console says when I ckick in the i icon) "the value was evaluated just now", but why I can show in html using ngFor but can't get the data inside the .ts file ?