mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Updated service options object to remove invalid properties and add missing properties. Updated via overloading service to include optional async instance lookup.
This commit is contained in:
@@ -30,7 +30,11 @@ myApp.config((
|
||||
myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng.material.IBottomSheetService) => {
|
||||
$scope['openBottomSheet'] = () => {
|
||||
$mdBottomSheet.show({
|
||||
template: '<md-bottom-sheet>Hello!</md-bottom-sheet>'
|
||||
template: '<md-bottom-sheet>Hello!</md-bottom-sheet>',
|
||||
clickOutsideToClose: true,
|
||||
disableBackdrop: true,
|
||||
disableParentScroll: false,
|
||||
parent: () => {}
|
||||
});
|
||||
};
|
||||
$scope['hideBottomSheet'] = $mdBottomSheet.hide.bind($mdBottomSheet, 'hide');
|
||||
@@ -115,6 +119,14 @@ myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.materia
|
||||
$scope['close'] = () => $mdSidenav(componentId).close();
|
||||
$scope['isOpen'] = $mdSidenav(componentId).isOpen();
|
||||
$scope['isLockedOpen'] = $mdSidenav(componentId).isLockedOpen();
|
||||
|
||||
$scope['asyncLookup'] = $mdSidenav(componentId, true).then((instance) => {
|
||||
instance.toggle();
|
||||
instance.open();
|
||||
instance.close();
|
||||
instance.isOpen();
|
||||
instance.isLockedOpen();
|
||||
});
|
||||
});
|
||||
|
||||
myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.IToastService) => {
|
||||
|
||||
+7
-5
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular Material 1.0.0-rc5+ (angular.material module)
|
||||
// Type definitions for Angular Material 1.1.0-rc5+ (angular.material module)
|
||||
// Project: https://github.com/angular/material
|
||||
// Definitions by: Matt Traynham <https://github.com/mtraynham>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -19,11 +19,12 @@ declare namespace angular.material {
|
||||
preserveScope?: boolean; // default: false
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
targetEvent?: MouseEvent;
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
clickOutsideToClose?: boolean;
|
||||
disableBackdrop?: boolean;
|
||||
escapeToClose?: boolean;
|
||||
resolve?: {[index: string]: angular.IPromise<any>};
|
||||
controllerAs?: string;
|
||||
bindToController?: boolean;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
parent?: Function|string|Object; // default: root node
|
||||
disableParentScroll?: boolean; // default: true
|
||||
}
|
||||
|
||||
@@ -134,6 +135,7 @@ declare namespace angular.material {
|
||||
}
|
||||
|
||||
interface ISidenavService {
|
||||
(component: string, enableWait: boolean): angular.IPromise<ISidenavObject>;
|
||||
(component: string): ISidenavObject;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user