-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Just reviwing what code does on FileUploaded event i got confused. File.
//All files are uploaded?
scope.allUploaded = false;
angular.forEach(scope.plFilesModel, function($file, key) {
//Bug FIX, this logic will set allUploaded right
if(file.percent != 100) {
scope.allUploaded = false;
} else if(file.id == $file.id) { //If the file is the same that we are reciving...
//Set response on the file
$file.response = JSON.parse(res.response);
//Need throw event? throw it
if(iAttrs.onFileUploaded) {
var fn = $parse(iAttrs.onFileUploaded);
fn(scope.$parent, {$response:res});
}
}
});My questions are:
- ¿Who puts allUploaded scope variable to true?
- throw event can be outside foreach Fn
- What is the key to set
$file.response = JSON.parse(res.response);if $file is just a temp variable.
Metadata
Metadata
Assignees
Labels
No labels