Skip to content
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

Fix for zone.js error in Safari, Added Typings #221

Merged
merged 9 commits into from
Jun 2, 2016

Conversation

marvinscharle
Copy link
Contributor

This PR contains the following changes:

  • Updated tsconfig.json to maintain tsconfig schema
  • Updated package.json to include all required packages (there are currently some missing)
  • Fixes zone.js error (More tasks executed then were scheduled) in Safari by removing NgZone from FileItem: Since zone.js 0.6.12, callbacks / observables are evaluated correctly in angular's zone by default. Therefore calling NgZone#run is not necessary anymore.
  • Updated both FileUploader and FileItem to include correct type specifications to check against in controllers that include ng2-file-upload

"del-cli": "0.2.0",
"es6-promise": "3.1.2",
"es6-shim": "0.35.0",
"es7-reflect-metadata": "1.6.0",
"eslint": "^2.10.2",

This comment was marked as off-topic.

@valorkin
Copy link
Member

Looks really good, please apply comment and rebase on top of dev branch

PS are you using npm 2?

@marvinscharle
Copy link
Contributor Author

Applied as suggested.

@valorkin yes - currently we're working with npm 2. Therefore some of those "missing" packages are non-flat dependency related.

@valorkin
Copy link
Member

valorkin commented Jun 2, 2016

Looks really good now! :)

PS: no need to fix, but:

  • ng2 is all about npm 3, or you will face a lot of weird issues
  • set save-exact for npm :) (non strict deps is a pain :))

@valorkin valorkin merged commit db77e89 into valor-software:development Jun 2, 2016
@marvinscharle
Copy link
Contributor Author

Thanks for merging @valorkin

npm 3 is much better, indeed. But ionic2 currently sings better with node 4.x. Therefore, we are using its built-in package manager - and that's unfortunately npm 2.

@lderks
Copy link

lderks commented Jul 7, 2016

Is this fix already available? Because in my safari browser on my mac, the single file upload on this page is not working: http://valor-software.com/ng2-file-upload/

@marvinscharle
Copy link
Contributor Author

It should been fixed. Can you post the error message you're receiving?

@lderks
Copy link

lderks commented Jul 8, 2016

In Chrome it works ok.

In safari on my mac, the progressbar is already 100% before I have clicked the upload button.
And after uploading, the status is not updated and stays empty.

This is the error I see in the console:

logError
call
__tryOrUnsub — Rx.js:10855
next — Rx.js:10810
_next — Rx.js:10766
next — Rx.js:10743
_finalNext — Rx.js:11425
_next — Rx.js:11417
next — Rx.js:11376
emit
onError
onHandleError
handleError — zone.js:327
runGuarded — zone.js:233
runInnerGuarded
runGuarded
outsideHandler
invokeTask — zone.js:356
runTask — zone.js:256
invoke — zone.js:423

@marvinscharle
Copy link
Contributor Author

marvinscharle commented Jul 8, 2016

@Can't find variable: Intl - Until now Safari does not support native i18n. This means that this is not related to this PR.

This polyfill should solve this issue: https://github.com/andyearnshaw/Intl.js/

Can you please open an issue for this @lderks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants