My modal features a login button:
<button type="button" (click)="save()" class="btn btn-primary">
login
</button>
Upon clicking the button, my desired outcome is to: first hide the modal, and second navigate to another route.
However, when I implement the following code:
save() {
this.modal.hide();
this.router.navigate(['login'])
}
I notice that the navigation occurs before the modal is hidden.
Is there a way for me to ensure the navigation only takes place once the modal has been successfully hidden?
I would prefer not to utilize timeouts or similar methods.