-
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: infinite digest on routing redirects #2638
Comments
Sorry but the codepen isn't working. One thing I'm starting to wonder if this is a difference between angular 1.2 and 1.3. |
Sounds very much like what I've seen on my side. Apparently not causing any obvious (permanent) breakage of the app in question but just acting up weird as you described. I suspect it could be because of the Angular upgrade. Will keep an eye. |
@adamdbradley Sorry about that. Bad link. Here's a good example : http://codepen.io/calendee/pen/zxGRza Please remember after changing to the newest Ionic nightly, you must change the URL to http://localhost:9000. |
When I use beta13 it sometimes would have the infinite loop, and sometimes not. When I use nightly it was always in an infinite loop. But when I comment out |
without the event.preventDefault(), the state changes to the originally intended path. The goal is to intercept that path and redirect to somewhere else. Even though the code tries to do this with |
FYI : See the ui-router docs on this : http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state
|
Actually, as you suggested, this is a problem with the update to Angular. See this issue : angular/angular.js#10228
Now, the app loads instantly to the correct page after identifying not authenticated. Any change of getting Angular 1.3.6 included in Ionic bundle? Then, I can see if that solves the overall problem. If that's not in the works prior to Beta 14, that's fine. Just go ahead and close this issue. |
I just updated to angular 1.3.6, hopefully that solves it! Thanks |
Just updated to Ionic 888 with Angular 1.3.6. It didn't help - the infinite digest is still there but I just don't care anymore. My fix with config.xml works well enough. |
Well that's a bummer, strange it does this for your app. However, the idea of using |
The |
There is a solution found here. Pass a function to $urlRouterProvider.otherwise. |
@cbruun Nice! Thank you so much! |
@cbruun yep, that did it for me too. |
@cbruun that did it for me. Thanks 🍺 |
Type: bug
Platform: all
Using $stateChangeStart to check authentication status causes infinite digest
To reproduce this, you must use Ionic CLI to create a local app. The problem will NOT be demonstrated in Codepen(not sure why).
So, do the following :
The text was updated successfully, but these errors were encountered: