mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Added toast class property to toast options/config object per commit … (#11132)
* Added toast class property to toast options/config object per commit f72c7816. Added id property to panel config per commit d230aec. * Added onClose() callback to sidenav object per commit 1f01d264.
This commit is contained in:
committed by
Masahiro Wakame
parent
fc1b3e11df
commit
f665c7f523
@@ -127,15 +127,30 @@ myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.materia
|
||||
instance.isOpen();
|
||||
instance.isLockedOpen();
|
||||
});
|
||||
|
||||
$scope['onClose'] = $mdSidenav(componentId).onClose(() => {});
|
||||
});
|
||||
|
||||
myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.IToastService) => {
|
||||
$scope['openToast'] = () => $mdToast.show($mdToast.simple().textContent('Hello!'));
|
||||
|
||||
$scope['customToast'] = () => {
|
||||
var options = {
|
||||
hideDelay: 3000,
|
||||
position: 'top right',
|
||||
controller : 'ToastCtrl',
|
||||
templateUrl : 'toast-template.html',
|
||||
toastClass: 'my-class'
|
||||
};
|
||||
|
||||
$mdToast.show(options);
|
||||
}
|
||||
});
|
||||
|
||||
myApp.controller('PanelController', ($scope: ng.IScope, $mdPanel: ng.material.IPanelService) => {
|
||||
$scope['createPanel'] = () => {
|
||||
var config = {
|
||||
id: 'myPanel',
|
||||
template: '<h1>Hello!</h1>',
|
||||
hasBackdrop: true,
|
||||
disableParentScroll: true,
|
||||
|
||||
+3
@@ -132,6 +132,7 @@ declare namespace angular.material {
|
||||
close(): angular.IPromise<void>;
|
||||
isOpen(): boolean;
|
||||
isLockedOpen(): boolean;
|
||||
onClose(onClose: Function): void;
|
||||
}
|
||||
|
||||
interface ISidenavService {
|
||||
@@ -162,6 +163,7 @@ declare namespace angular.material {
|
||||
preserveScope?: boolean; // default: false
|
||||
hideDelay?: number; // default (ms): 3000
|
||||
position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left'
|
||||
toastClass?: string;
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean; // default: false
|
||||
@@ -291,6 +293,7 @@ declare namespace angular.material {
|
||||
}
|
||||
|
||||
interface IPanelConfig {
|
||||
id?: string;
|
||||
template?: string;
|
||||
templateUrl?: string;
|
||||
controller?: string|Function;
|
||||
|
||||
Reference in New Issue
Block a user