0
In a modal I have a form with data that can be edited. If the user confirms the update the data is updated and then it will be forwarding the new page. But on this new page the information that appears is still the old information (before the update). If I give an F5 the new information appears.
Information that appears at the first moment when I confirm the update.
Follow the code below:
updateClonedQuote(): void {
this.canDeactivate = false
const updateQuote = this.cloneQuoteForm.getRawValue() as ClonedQuoteValue
this.quoteService.updateQuote(updateQuote, this.dataClonedQuote.id)
.subscribe(
() => {},
(err) => console.log(err),
() => {
this.modalService.dismissAll()
this.route.navigate(['quotes-abertas/', this.dataClonedQuote.id])
}
)
}
Add the code of your second page (Quotes-open), it seems that the problem is in it.
– edson alves
What happens is: when I open http://localhost:4200/Quotes-open/324 a get request takes the information and fills the fields. When I make a copy I am automatically redirected to this new proposal with url http://localhost:4200/Quotes-open/325, but the functions within ngOnInit() are not run again. I thought the angular performed these functions again, but it seems that no
– Leonardo Vinicius