-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug($ionicHistory): Accessing a view that has already been accessed before $ionicHistory.clearCache() fails #2664
Comments
The controller appears to re-instantiate properly, but it looks as if the HTML content does not get $compile'd, so the view is busted as a result. |
@wesleycho Would you be able to recreate this problem with a codepen? Thanks |
Will do tomorrow - I did more investigation, and it may be related to the scroll directive compiling twice & an isolate scope breaking the normal inheritance, so that the isolate scope is inheriting instead of the normal one. |
I've been unable to replicate this issue, a codepen replicating this issue would help me debug. Thanks |
This reproduces for me as well. Here is a codepen: http://codepen.io/anon/pen/ZYpqPG When you click on the second tab, AboutTabCtrl calls $ionicHistory.clearCache(). If you click back to the first tab, the content does not display. If you comment out $ionicHistory.clearCache(), the example works fine. |
+1 |
Any updates on this issue? as @wesleycho suggested, this seems to have to do with scroll directive as it can be seen in the codepen @mikemintz provided. After coming back to first tab, the content is actually there but it is scrolled out of view. If you pull the view down, you can see the content. |
Same issue. I'm using bindonce so if a user logs out of my app, I need to clear the cache so a new user can log in. But when they do and go to the same pages, I run into this problem. |
Addendum: It appears that this may be related to calling clearCache/clearHistory while a slide is transitioning. If I wrap the clearCache call in a timeout, things work as expected. So this doesn't work: while this does: |
When the user has visited a view, then $ionicHistory.clearCache() runs, any time the user accesses the same view again, it fails to load properly.
The text was updated successfully, but these errors were encountered: