Hi,

I am using bellow code to return value.

var flag = true;
var data = function(dataFlag) {
return dataFlag.then(function(text) {
if (text == true) {
return true;
} else {
console.log(text);
return false;
}
});
};

if (data(data1) == false) { // Here data(data1) getting as object
flag = false;
}
if (data(data2) == false) {
flag = false;
}
if (data(data3) == false) {
flag = false;
}

return flag;


How to handle this code ?

Regards,
Om Prakash

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to