Skip to content

Commit

Permalink
IModalServiceInstance missing closed promise (DefinitelyTyped#9083)
Browse files Browse the repository at this point in the history
* added missing closed promise

was missing closed promise

* added test for closed promise
  • Loading branch information
ritter authored and vvakame committed May 1, 2016
1 parent 0b96933 commit 06d3bae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions angular-ui-bootstrap/angular-ui-bootstrap-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ testApp.controller('TestCtrl', (
$log.log('modal rendered');
});

modalInstance.closed.then(()=> {
$log.log('modal closed');
});

modalInstance.result.then((closeResult:any)=> {
$log.log('modal closed', closeResult);
}, (dismissResult:any)=> {
Expand Down
5 changes: 5 additions & 0 deletions angular-ui-bootstrap/angular-ui-bootstrap.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ declare namespace angular.ui.bootstrap {
* A promise that is resolved when a modal is rendered.
*/
rendered: angular.IPromise<any>;

/**
* A promise that is resolved when a modal is closed and the animation completes.
*/
closed: angular.IPromise<any>;
}

interface IModalScope extends angular.IScope {
Expand Down

0 comments on commit 06d3bae

Please sign in to comment.