In loop session: I can get data out but outside the loop I can't "log" it.
getAbouts(){
this.getInfos().subscribe(data => {
console.log(data);
this.data = data;
for (var k of this.data){
// console.log("data is components: " + k.ten_demuc);
this.getData.push(k.ten_demuc);
//console.log(this.getData);
}
})
}
Instead of var you can use let in the for loop.
for (let k of this.data){
}