0
I’m taking the list like this:
listarTodosEstados() {
return this.http.get<any[]>(`${this.estadosUrl}`);
}
This is my Component:
pesquisarEstados() {
this.cidadesService.listarTodosEstados()
.subscribe(dados => {
console.log(this.estados = dados);
});
}
That is the result:
Please, I would like to know how to only print on the console.log only the attribute code?
thank you very much for the suggestion :)
– wladyband
there’s only one detail, he didn’t recognize the e.codigo because it didn’t even compile.
– wladyband
@wladyband It is because you typed the list as
any
, right. Just putany
before.– Jéf Bueno
sorry my lack of understanding, I copied and pasted the way your suggestion is, where I will put any?
– wladyband
@wladyband is there at the beginning of the answer, young man
– Jéf Bueno
found, valeu hahaha
– wladyband