I’m trying to recharge the same page on Angular (v18) with a different state with this function:
openForm(form: FormFavoriteElement) {
form.createDraft = true;
this.formDataService
.getFavouriteFormContent(form.acroContentId, 'acro')
.subscribe((result) => {
this.router.navigateByUrl('/pdfViewer', {
onSameUrlNavigation: 'reload',
replaceUrl: true,
skipLocationChange: true,
state: {
pdfdata: result,
data: form,
},
});
});
}
but what’s happend is that at the first try doesn’t charge anything, at the second one the new form appear.
Do you know what I’m doing wrong? I thought that maybe I have to clear the state before, but I’m not finding how to do that.
Thank you for your help
New contributor
Valentina Maronese is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.