Hi
I have written a directive in which on destroy event i need to call some
AJAX request and I want my destroy event to wait for the AJAX call to
finished.
Here is my code.
scope.$on('$destroy', function() {
callmethodAsync("").always(function() {
// Do some cleanup or logging
console.log('inside remember');
});
});
Here i want my destroy method to wait for asyn method execution. How I can
achieved that.
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.