-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Bindings won't refresh in Firefox (presumably caused by core-js/es6/es6-promise) #709
Comments
thanks, fixed via c1d8fd5 |
cc @zloirock there seems to be a problem with the |
Very strange. Can you write a full reproducible example with all environment? I'll play with it when I'll have some time. |
@zloirock I experienced this bug too with Chrome and Angular rc.3. If I import 'core-js/es6/promise' the page doesn't load all the bindings. There are no errors in console at all. All others files in core-js/es6 folder can be imported without any issue. To reproduce it easly create a very basic project using webpack (you can clone my MEAN stack project) and into vendor.ts try to write "import 'core-js/es6';" or all the files individually, including promise. Edit: seems solved. |
@borisvasilenko learn some angular before start coding. But if you really need to use async code that located outside of angular app, you need to wrap it with NgZone.run(yourCode) or finalize it with ChangeDetectorRef.detectChanges() http://stackoverflow.com/questions/34827334/triggering-angular2-change-detection-manually http://stackoverflow.com/questions/32768854/using-promises-and-zones-in-angular2 Everything worked perfectly for me with import 'core-js/es6'; and now I have a bug and need manually change polyfills.ts to previous version |
Thanks, i know about NgZone.run and detectChanges. I also believe, that your work-around is worse than removing the 'core-js/es6' import, because it pollutes the project code with unnecessary calls like NgZone.run or detectChanges. And yes, I know about @angular/http, but issue is not about @angular/http. I still need to use raw fetch API at some places. And I need to use it directly, without NgZone.run or other work-arounds. |
I think zone.js provides it's own promise polyfill so manually removing |
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
Bindings on the page won't refresh after the XHR/fetch completes.
Call fetch and try to display something when the loading complete. Please, see an example here:
borisvasilenko@eaaf794
Browser: Firefox.
The page should display the text: 'THIS SHOULD BE DISPLAYED'
We've updated our project to the angular2-webpack-starter with Angular RC1.
What I've found out by trial and error:
In Firefox
You can see my fix here: borisvasilenko@da2ac79
The text was updated successfully, but these errors were encountered: