Updated IDialogOptions to include contentElement property for prerendered dialogs. Updated IPromptDialog to add initialValue method. Adding missing semicolon to IPanelConfig.

This commit is contained in:
Alex Staroselsky
2016-06-26 18:25:58 -05:00
parent 1fa759c57b
commit bbdbb551a9
2 changed files with 15 additions and 3 deletions

View File

@@ -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');
});

View File

@@ -62,12 +62,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;
@@ -88,7 +90,7 @@ declare namespace angular.material {
onShowing?: Function;
onComplete?: Function;
onRemoving?: Function;
fullscreen?: boolean;
fullscreen?: boolean; // default: false
}
interface IDialogService {
@@ -296,7 +298,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;