Last active
January 29, 2016 23:06
-
-
Save solars/72b69819b5aacd91dc48 to your computer and use it in GitHub Desktop.
Demo: http://valor-software.github.io/ng2-file-upload/ I want to display the response together with a completed item.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this overridden method yields the response when an item completes | |
export class SimpleDemo { | |
private uploader:FileUploader = new FileUploader({url: URL}); | |
private hasBaseDropZoneOver:boolean = false; | |
private hasAnotherDropZoneOver:boolean = false; | |
constructor() { | |
this.uploader.onCompleteItem = (item: any, response: any, status: any, headers: any) => { | |
console.log(response, responsePath);// the url will be in the response | |
}; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is where the items are rendered, I have no idea how I could add the response | |
<tr *ngFor="#item of uploader.queue"> | |
<item-detail [item]="item"></item-detail> | |
<td [id]="item?.file?.name" ><strong>{{ item?.file?.name }}</strong></td> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment