Open dstj opened 1 year ago
We've had reports of something that sounds very similar, with AngularJS and an older version of Pace
After seeing this and digging around in Pace.sources
and seeing it was Pace.sources[3]
that was just sitting at 20% I added eventLag: false
to Pace.options
and Firefox looks to be loading without issue now. Of course I now have to dig into what changing that might break..
Edit - setting lagThreshold looks like the optimal change https://github.com/CodeByZach/pace/issues/62#issuecomment-29265032
@BlairMcClelland
Thanks for the information. I looked at the linked comment and tried to play with eventLag.lagTreshold
. Adding this code to main.ts
seems to work (though I have no idea about any possible side-effect of changing eventLag.lagThreshold
).
declare var Pace: any;
Pace.options.eventLag.lagThreshold = 12;
Note:
Pace.options.eventLag.lagThreshold = 10;
does NOT workPace.options.eventLag.lagThreshold = 11
works, but much slower than 12
Hi,
OK, it's a weird one, granted, but I'm at a loss... :/
Description
In Firefox, simply adding
pace-js
to the application causes Angular to never fire theApplicationRef.isStable = true
event. But, in Chrome, Edge, Brave, it fires like expected...Reproduction
ng new testapp
app.component.ts
:ng serve
and confirm the output (in Firefox)pace-js
to the appliation: runng add pace-js
angular.json
to include the pace-js script:ng serve
again and confirm the output (in Firefox)Problem: The application never become "stable"! In Chrome and Edge, the
isStable = true
"event" is fired as expected.The Angular doc about ApplicationRef says:
I know the
pace-js
source code hassetInterval
andsetTimeout
in it, so it's probably related somehow, I don't know. Any ideas how to resolve this? And why only Firefox seems affected?Tested with: