-
Notifications
You must be signed in to change notification settings - Fork 5
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
Issue with step 11 of angular-tutorial #3
Comments
How does your html file look like? |
Hi I tried with it too, same thing. Below is the html. It might have something to do with ngView, since I've tried with step 6 that doesnt have ngView and it doesnt break node (although it has ng-repeat issues that i'll post in another issue). thanks for looking at this. I hope we can mature this project as its so essential for real public-facing sites.
and the exception:
|
Hi, I could reproduce the problem and I now remember that this occurred me once in ngtest07.html. |
ok good. I've been trying with the router I'm using, angular-ui router and it crashes it much the same way - over there, it might be 'transitionTo' which crashes it, but its really a major part of the architecture and cannot be operated with it could it relate to $locationWatch? it might be that jsdom does not update the location.href well or doesnt fire right events after updated. I found this, btw - it might help - http://stackoverflow.com/questions/10054071/jsdom-hashchange-event |
from some logging on angular.js it seems $locationWatch doesnt settle since oldvalue is always http://localhost:3000/catalog/productdetails/145578 this is with my app, using html5 more. so maybe jsdom fallbacks to hashbangs and then it fails? just a thought |
Thanks for investigating this. I agree that $locationWatch is a major part of angualr.js. |
Possible related ticket: angular/angular.js#1417 |
@lmessinger Please try your example and if it still fails, reopen the issue. |
trying tutorial 11 crashes the server - probably on the pre-rendering using JSDOM. crash log below. Same issue also happened on my own app, BTW.
the code below includes some of my logs (js here)
thanks!
C:\code\server\ang-cat>node server\webserver.js
Express server listening on port 3000
Express server listening on port 443
prerenderer url: http://localhost:3000/index.html
back from request
document after jsdom true
GET /index.html 200 45ms - 560
GET /js/services.js 200 12ms - 261
GET /js/app.js 200 10ms - 434
GET /js/filters.js 200 13ms - 186
GET /js/controllers.js 200 16ms - 545
GET /lib/angular/angular-resource.js 200 12ms - 15.93kb
GET /lib/angular/angular.js 200 108ms - 493.6kb
http://localhost:3000/lib/angular/angular.js:8128
throw e;
^
Error: 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 18; oldVal: 17","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngRepeatWatch; newVal: undefined; oldVal: undefined"],["fn: $locationWatch; newVal: 19; oldVal: 18","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngRepeatWatch; newVal: undefined; oldVal: undefined"],["fn: $locationWatch; newVal: 20; oldVal: 19","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngRepeatWatch; newVal: undefined; oldVal: undefined"],["fn: $locationWatch; newVal: 21; oldVal: 20","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngRepeatWatch; newVal: undefined; oldVal: undefined"],["fn: $locationWatch; newVal: 22; oldVal: 21","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngModelWatch; newVal: undefined; oldVal: undefined","fn: ngRepeatWatch; newVal: undefined; oldVal: undefined"]]
at Error (unknown source)
at Object.$get.Scope.$digest (http://localhost:3000/lib/angular/angular.js:7953:19)
at Object.$get.Scope.$apply (http://localhost:3000/lib/angular/angular.js:8125:24)
at done (http://localhost:3000/lib/angular/angular.js:9135:20)
at completeRequest (http://localhost:3000/lib/angular/angular.js:9297:7)
at xhr.onreadystatechange (http://localhost:3000/lib/angular/angular.js:9267:11)
at exports.XMLHttpRequest.dispatchEvent (C:\code\server\ang-cat\node_modules\connect-prerenderer\node_modules\jsdom\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:534:25) at exports.XMLHttpRequest.setState (C:\code\server\ang-cat\node_modules\connect-prerenderer\node_modules\jsdom\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:553:14)
at IncomingMessage.exports.XMLHttpRequest.send.syncFile (C:\code\server\ang-cat\node_modules\connect-prerenderer\node_modules\jsdom\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:403:13) at IncomingMessage.EventEmitter.emit (events.js:123:20)
The text was updated successfully, but these errors were encountered: