I'm trying to call a function after a popup automatically closes after 1 second. This is my code:
$timeout(function() {
var closeit = myPopup.close();
closeit.then(function() {
$scope.dosomething();
});
}, 1000);
The dosomething function is never called. I'm new to AngularJS, anyone who can help me with this?
myPopupreturn a promise?