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

Merged
marvinscharle merged 9 commits from development into development 2016-06-02 13:17:25 +00:00
marvinscharle commented 2016-05-24 22:50:42 +00:00 (Migrated from github.com)

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
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
valorkin commented 2016-05-31 13:44:34 +00:00 (Migrated from github.com)

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

PS are you using npm 2?

Looks really good, please apply comment and rebase on top of dev branch PS are you using npm 2?
marvinscharle commented 2016-06-01 22:26:12 +00:00 (Migrated from github.com)

Applied as suggested.

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

Applied as suggested. @valorkin yes - currently we're working with npm 2. Therefore some of those "missing" packages are non-flat dependency related.
valorkin commented 2016-06-02 13:16:57 +00:00 (Migrated from github.com)

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 :))
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 :))
marvinscharle commented 2016-06-02 17:42:04 +00:00 (Migrated from github.com)

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.

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 commented 2016-07-07 08:44:59 +00:00 (Migrated from github.com)

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/

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 commented 2016-07-07 14:52:16 +00:00 (Migrated from github.com)

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

It should been fixed. Can you post the error message you're receiving?
lderks commented 2016-07-08 09:27:05 +00:00 (Migrated from github.com)

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

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: ```10855ORIGINAL EXCEPTION: ReferenceError: Can't find variable: Intl 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 commented 2016-07-08 12:27:21 +00:00 (Migrated from github.com)

@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?

@`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 in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#221