javascript - Passing data from deferred to when -



javascript - Passing data from deferred to when -

is there way pass info deferred fail when fail.

below, when files have been shown, if of files fail in self.fileshow log names. possible of names 1 time deferrers finished in when?

$.when.apply($, $.map(files, function (file, index) { homecoming self.fileshow(file, filesrc, filenewtemplate) .fail(function () { console.log(file.name) }); })).fail(function () { console.log('i want file names here failed') })

this not reply question title, offers solution problem. pass parameters you utilize deferred.pipe.

var defer = $.deferred(), filtered = defer.pipe( null, function( value ) { homecoming value * 3; }); defer.reject( 6 ); filtered.fail(function( value ) { alert( "value ( 3*6 = ) 18: " + value ); });

here's illustration of passing object fail.

javascript jquery

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -