Within my main controller, I have a function called $scope.showDialog
:
$scope.showDialog = function(ev) {
$mdDialog.show({
controller: 'DialogController',
templateUrl: 'partials/dialog.tmpl.ejs',
targetEvent: ev
})
};
In my dialog controller, I have a function called $scope.hide
:
$scope.hide = function() {
$mdDialog.hide();
};
(The dialog directive I'm using is from angular material). Is there a way for the main controller to detect when the dialog window is closed?