-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Application unexpected behavior on clicking browser history back/forward buttons #78
Comments
The console warning is unrelated. See #53 Could you push a minimal repo that reproduces the error shown in the gif? I won't be able to look at this until next week, but a github repo that reproduces the issue would help me debug a lot. |
Hi @joeldenning, After a lot of exploring the topics on Angular router-outlet, ngZones, Change Detection and of course your discussion in issue #53 (comment) . I tried the following piece of code in the sub-application's root component's
I dont know whether this is the best practice or not, if you can analyse it and let me know. Thanks! |
I am still unable to reproduce this problem. If anyone can push a repo that reproduces this would help. The back button works when navigating at http://coexisting-angular-microfrontends.surge.sh/.
Your code is forcing an angular change detection tick every time that the route changes. Which is pretty similar to what older versions of single-spa-angular did before there was a big fix in single-spa@4.3.0 that made it unnecessary. Once single-spa@4.3.0 was released, we removed the angular tick code from single-spa-angular and things have been working fine. Since you are running into a situation where it isn't working fine, we might need to look at it again. I am going to close this since I have no way to reproduce. Please reopen if the error persists and there's a way to reproduce. |
Hi @joeldenning |
Hi, @joeldenning I am looking forward to hearing from you. |
I will look at this tomorrow, in conjunction with looking at #94 |
Thank you very much, It still work in angular 17 you saved my day :D |
When I navigate through the application's router links all work perfectly. But when I try to navigate back using the browser's back button application shows multiple instances of angular components.
Please see the attached gif.
![Peek 2019-05-22 16-33](https://user-images.githubusercontent.com/16270049/58171870-64dffd00-7cb0-11e9-990d-8825ac032c28.gif)
The text was updated successfully, but these errors were encountered: