-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Angular app gets into an infinite digest loop #6799
Comments
I've added some logging to the angular digest cycle. It seems that some services start initializing in the http-server version, but not in electron. |
The part that looks wrong to me is this bit // electron
document.write('<base href="file://' + __dirname + '/"/>'); You can't load a local Or even better, you have a full node environment. Just run the |
That is actually a good idea. I'll try that. With trial and error i was able to narrow down the problem to this line: $locationProvider.html5Mode(true); commenting that allowed me to get passed the infinite digest loop I'll close the issue for now. If disabling the html5mode causes any issues with our ui-router, i'll try your solution or reopen the issue. |
I have an offline angular app that i can run with http-server and it works.
But when i switch it over to electron and fix a few issues it gets into an infinite digest loop.
I'm wondering what could cause this since only the environment changed, not the angular code. I read somewhere it could be a template being requested that isn't found because the path should be file:///. Is there any way to verify this.
I also tried to debug the angular unminified code, but i don't understand enough about the watcher list to see which watcher changes value all the time.
![image](https://cloud.githubusercontent.com/assets/1710840/17563877/36a95e26-5ee6-11e6-89bd-383a9228129b.png)
These are all the watcher values during the digest cycles:
The things that differ between electron and the http-server version are:
and
The exception:
I know this is hard to debug without more code examples, but i'm just looking for some leads why this would occur in electron and not in an http-server
The text was updated successfully, but these errors were encountered: