non-angular postal code query


I have the following code:

cadastro.ts

get_cep () {
Return this.http.get (`https://viacep.com.br/ws/$ {this.usuario.cep} / json /`)
.toPromise ()
then (res => {
console.log (res);
console.log (this.user);
return this.converterPart response (res.json ())
})
}

private converterResponse on cep (cepNaResposta): user {user}
let user = new user ();
user.cep = cepNaResposta.cep;
user.city = cepNaResposta.locality;
user.logradouro = cepNaResposta.logradouro;
user.status = cepNaResposta.uf;
returning user;
}

cadastro.html

 




        

User.ts

Export class user {
Establishment_Name: string;
cnpj: string;
cep: string;
City: String;
Neighborhood: string;
Supplement: String;
Number: String;
Telephone: string;
Terrace: string;
Status: string;
}

It is not returned by passing the data, but only the boletus to the User.ts. I use the angle 4