I started in the angle4 shortly, I need to get the information of a field and go to the edit screen, I already have this information in a console.log of the screen edit that I put to test, only problem is that n to achieve display in the fields, maybe it would be the Input decorator but not able to use it, any help?
I have this condition if in case the ID has defined it search in the regioesById service for route edit, I already have the id in the route also what is missing is to display, follow code:
if (this.route.snapshot.params['id'] != undefined) {
this.regiaoService.regioesById(this.route.snapshot.params['id'])
.subscribe(
regioes => {
this.regioes = regioes
this.idRegioes = regioes.codigoregiao
console.log(this.regioes);
})
}
I declare before the constructor this variable that receives the regions:
Regions: Regions