Can someone assist me with a problem I'm facing? After the first callback, the variable doesn't seem to change as expected. Below is my code snippet:
this.handlerLocalDef = function(defer) {
var hash = {};
defer.then(
function(response) {
hash = response;
},
function(err) {
showPopup(err);
}
);
return hash;
};
var initialized = function() {
var localRegDef = Localization.getLocalizedDefer('regularform'),
localPaymDef = Localization.getLocalizedDefer('payment');
localizeRegForm = self.handlerLocalDef(localRegDef);
$timeout(function() {
console.log("localizeRegForm", localizeRegForm);
}, 5000);
}();
Upon checking the console log, it shows `localizeRegForm: {}`