Update file-item.ts #30

Merged
rariancom merged 1 commits from patch-1 into master 2016-05-11 16:15:24 +00:00
rariancom commented 2016-01-22 23:05:49 +00:00 (Migrated from github.com)

See: https://github.com/valor-software/ng2-file-upload/issues/29
Fixed by updating progress inside zone.run()

See: https://github.com/valor-software/ng2-file-upload/issues/29 Fixed by updating progress inside zone.run()
valorkin commented 2016-01-23 13:45:14 +00:00 (Migrated from github.com)

hey, thanks for PR
direct working with zone.js could be dangerous in long run
any way to fix this with change detection strategies?

hey, thanks for PR direct working with zone.js could be dangerous in long run any way to fix this with change detection strategies?
peregrinator commented 2016-03-25 03:49:33 +00:00 (Migrated from github.com)

Any thoughts on how to deal with this via change detection?

I'm having the same problem - changes to attributes on the file-item do not trigger change detection and thus my templates do not update.

Simplified my code looks like:

<ul>
  <upload-item *ngFor="#item of uploader.queue" [item]="item"></upload-item>
</ul>
...
export class UploadItemComponent {
  @Input() item
}
<p>Error: {{item.isError}}, Uploading: {{item.isUploading}}, Ready: {{item.isReady}}, Success: {{item.isSuccess}}, Canceled: {{item.isCancel}}</p>
Any thoughts on how to deal with this via change detection? I'm having the same problem - changes to attributes on the file-item do not trigger change detection and thus my templates do not update. Simplified my code looks like: ``` html <ul> <upload-item *ngFor="#item of uploader.queue" [item]="item"></upload-item> </ul> ``` ``` javascript ... export class UploadItemComponent { @Input() item } ``` ``` html <p>Error: {{item.isError}}, Uploading: {{item.isUploading}}, Ready: {{item.isReady}}, Success: {{item.isSuccess}}, Canceled: {{item.isCancel}}</p> ```
valorkin commented 2016-05-11 16:15:36 +00:00 (Migrated from github.com)

Thanks for your help :)

Thanks for your help :)
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#30