- }).closePromise.then(needUpdate => {
- if (resourceType == 'NEWS') {
- $scope.updateNews();
- } else if (resourceType == 'EVENTS') {
- $scope.updateEvents();
- } else if (resourceType == 'IMPORTANTRESOURCES') {
- $scope.updateImportRes();
- }
- });
+ })
+
+ modalInstance.result.finally(function (needUpdate){
+ if (resourceType == 'NEWS') {
+ $scope.updateNews();
+ } else if (resourceType == 'EVENTS') {
+ $scope.updateEvents();
+ } else if (resourceType == 'IMPORTANTRESOURCES') {
+ $scope.updateImportRes();
+ }
+ });