mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
angular-ui-bootstrap: add missing $modalStack service
This commit is contained in:
parent
2bd91a105a
commit
91904e99be
@ -121,11 +121,12 @@ testApp.controller('TestCtrl', (
|
||||
$scope: ng.IScope,
|
||||
$log: ng.ILogService,
|
||||
$modal: ng.ui.bootstrap.IModalService,
|
||||
$modalStack: ng.ui.bootstrap.IModalStackService,
|
||||
$position: ng.ui.bootstrap.IPositionService,
|
||||
$transition: ng.ui.bootstrap.ITransitionService)=> {
|
||||
|
||||
/**
|
||||
* test the $modal instance
|
||||
* test the $modal service
|
||||
*/
|
||||
var modalInstance = $modal.open({
|
||||
backdrop: 'static',
|
||||
@ -153,6 +154,17 @@ testApp.controller('TestCtrl', (
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* test the $modalStack service
|
||||
*/
|
||||
$modalStack.open(modalInstance, { scope: $scope });
|
||||
$modalStack.close(modalInstance);
|
||||
$modalStack.close(modalInstance, 'with reason');
|
||||
$modalStack.dismiss(modalInstance);
|
||||
$modalStack.dismiss(modalInstance, 'with reason');
|
||||
$modalStack.getTop().key.close();
|
||||
|
||||
|
||||
/**
|
||||
* test the $position service
|
||||
*/
|
||||
|
||||
27
angular-ui-bootstrap/angular-ui-bootstrap.d.ts
vendored
27
angular-ui-bootstrap/angular-ui-bootstrap.d.ts
vendored
@ -248,6 +248,33 @@ declare module ng.ui.bootstrap {
|
||||
windowClass?: string;
|
||||
}
|
||||
|
||||
interface IModalStackService {
|
||||
/**
|
||||
* Opens a new modal instance.
|
||||
*/
|
||||
open(modalInstance: IModalServiceInstance, modal: any): void;
|
||||
|
||||
/**
|
||||
* Closes a modal instance with an optional result.
|
||||
*/
|
||||
close(modalInstance: IModalServiceInstance, result?: any): void;
|
||||
|
||||
/**
|
||||
* Dismisses a modal instance with an optional reason.
|
||||
*/
|
||||
dismiss(modalInstance: IModalServiceInstance, reason?: any): void;
|
||||
|
||||
/**
|
||||
* Gets the topmost modal instance that is open.
|
||||
*/
|
||||
getTop(): IModalStackedMapKeyValuePair;
|
||||
}
|
||||
|
||||
interface IModalStackedMapKeyValuePair {
|
||||
key: IModalServiceInstance;
|
||||
value: any;
|
||||
}
|
||||
|
||||
|
||||
interface IPaginationConfig {
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user