I have the following piece of code that is triggered on a button click, everything works as expected but when the code reaches: this.router.navigateToRoute the whole browser hangs.
Can someone explain this behavior to me?
async submit() {
var isValid = await this.isDeliveryValid();
if(isValid)
{
var response = await this.createOrder();
if(response.isCreated){
await this.dialogService.open({
viewModel: MessageModal,
model: [
"Some Message",
response.message
]
}).whenClosed();
this.router.navigateToRoute("emails");
}
}
}