mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 22:01:08 +08:00
Merge pull request #9826 from AlStar01/angular-material-rc.5
Updated IDialogOptions to include contentElement property for prerend…
This commit is contained in:
@@ -67,6 +67,16 @@ myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.
|
||||
$scope['promptDialog'] = () => {
|
||||
$mdDialog.show($mdDialog.prompt().placeholder('Prompt input placeholder text'));
|
||||
};
|
||||
$scope['promptDialog'] = () => {
|
||||
$mdDialog.show($mdDialog.prompt().initialValue('Buddy'));
|
||||
};
|
||||
$scope['prerenderedDialog'] = () => {
|
||||
$mdDialog.show({
|
||||
template: '<md-dialog>Hello!</md-dialog>',
|
||||
contentElement: '#myDialog',
|
||||
clickOutsideToClose: true
|
||||
});
|
||||
};
|
||||
$scope['hideDialog'] = $mdDialog.hide.bind($mdDialog, 'hide');
|
||||
$scope['cancelDialog'] = $mdDialog.cancel.bind($mdDialog, 'cancel');
|
||||
});
|
||||
|
||||
10
angular-material/angular-material.d.ts
vendored
10
angular-material/angular-material.d.ts
vendored
@@ -68,12 +68,14 @@ declare namespace angular.material {
|
||||
|
||||
interface IPromptDialog extends IPresetDialog<IPromptDialog> {
|
||||
cancel(cancel: string): IPromptDialog;
|
||||
placeholder(placeholder: string): IPromptDialog;
|
||||
placeholder(placeholder: string): IPromptDialog;
|
||||
initialValue(initialValue: string): IPromptDialog;
|
||||
}
|
||||
|
||||
interface IDialogOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
contentElement?: string|Element;
|
||||
autoWrap?: boolean; // default: true
|
||||
targetEvent?: MouseEvent;
|
||||
openFrom?: any;
|
||||
@@ -81,7 +83,7 @@ declare namespace angular.material {
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
disableParentScroll?: boolean; // default: true
|
||||
hasBackdrop?: boolean // default: true
|
||||
hasBackdrop?: boolean; // default: true
|
||||
clickOutsideToClose?: boolean; // default: false
|
||||
escapeToClose?: boolean; // default: true
|
||||
focusOnOpen?: boolean; // default: true
|
||||
@@ -94,8 +96,8 @@ declare namespace angular.material {
|
||||
onShowing?: Function;
|
||||
onComplete?: Function;
|
||||
onRemoving?: Function;
|
||||
fullscreen?: boolean;
|
||||
skipHide?: boolean;
|
||||
fullscreen?: boolean; // default: false
|
||||
}
|
||||
|
||||
interface IDialogService {
|
||||
@@ -303,7 +305,7 @@ declare namespace angular.material {
|
||||
focusOnOpen?: boolean; // default: true
|
||||
fullscreen?: boolean; // default: false
|
||||
animation?: IPanelAnimation;
|
||||
hasBackdrop?: boolean // default: false
|
||||
hasBackdrop?: boolean; // default: false
|
||||
disableParentScroll?: boolean; // default: false
|
||||
onDomAdded?: Function;
|
||||
onOpenComplete?: Function;
|
||||
|
||||
Reference in New Issue
Block a user