Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigate after modal closed is not working properly. #313

Open
Guervyl opened this issue Feb 18, 2021 · 0 comments
Open

Navigate after modal closed is not working properly. #313

Guervyl opened this issue Feb 18, 2021 · 0 comments

Comments

@Guervyl
Copy link

Guervyl commented Feb 18, 2021

Describe the bug
When I open a modal and navigate to another page in the modal callback/promise, the page opens and then open the page that was opened before and multiply the pages in the stack. My solution is to wait for 300 milliseconds to navigate to the other page. This solution works with no problem. But my concern is if on some other devices the modal take more time than the 300 milliseconds to navigate back y application will break.

To Reproduce
Navigate to a page and open a modal in that page. Navigate to another page as soon as the then promise is called.

this.modalService.showModal(MyModalComponent, {
    fullscreen: false,
    viewContainerRef: this.viewContainer
}).then(ajoute => {
   //router is RouterExtensions
    this.router.navigate(["/a-page"], {transition: {name: 'slide'}})
})

Expected behavior
The navigation should works with no problem. The promise was supposed to get called after the modal navigate to the page it was before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant