mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Angular-Modal update activate method
Support using locals within the activate method. This is documented here https://github.com/btford/angular-modal\#modalserviceactivate
This commit is contained in:
@@ -94,6 +94,10 @@ function callingValues() {
|
||||
template: '<div></div>'
|
||||
});
|
||||
modal.activate().then(() => {}, () => {});
|
||||
// activating with random locals
|
||||
modal.activate({name: 'TestName'}).then(() => {}, () => {});
|
||||
// activating with genericly typed locals
|
||||
modal.activate<{name: string}>({name: 'TestName'}).then(() => {}, () => {});
|
||||
modal.deactivate().then(() => {}, () => {});
|
||||
var isActive: boolean = modal.active();
|
||||
}
|
||||
|
||||
3
types/angular-modal/index.d.ts
vendored
3
types/angular-modal/index.d.ts
vendored
@@ -28,7 +28,8 @@ declare namespace angularModal {
|
||||
}
|
||||
|
||||
export interface AngularModal {
|
||||
activate(): angular.IPromise<void>;
|
||||
activate(locals?: {}): angular.IPromise<void>;
|
||||
activate<T>(locals: T): angular.IPromise<void>;
|
||||
deactivate(): angular.IPromise<void>;
|
||||
active(): boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user