dwmkerr / angular-modal-service

Modal service for AngularJS - supports creating popups and modals via a service.
MIT License
626 stars 321 forks source link

doing operations on modal close #238

Open mustafabereket opened 6 years ago

mustafabereket commented 6 years ago

Hey guys,

I want to be able to call some functions and do some calculations when modal is closing, but I couldnt find anything like "onClose". The existing modal.close.then(function(result) {}) thing doesnt even get fired when I close my modal. Not sure if "modal.close.then" is something that I am looking for. But all I want to simply do is, when the user clicks on "Save" button on my modal, I want to make an $http call and refresh the table on the previous view before modal.

Anyone can help me with this?

decherneyge commented 5 years ago

modal.close.then(function(result){}) should provide you with a hook to do things after the modal is closed. If you want to post some more context I'd be happy to take a look and see why its not working for you.