1.

What Is Angular Material Bottom Sheet?

Answer»

$mdBottomSheet, an Angular Service, is used to open a bottom sheet over the application and provides a simple promise API.

Methods: templateUrl - {string=}: The URL of an html template file that will be used as the content of the bottom sheet. Restrictions: the template must have an outer md-bottom-sheet element.

template - {string=}: Same as templateUrl, EXCEPT this is an actual template string.

scope - {object=}: the scope to link the template / controller to. If none is specified, it will create a new child scope. This scope will be destroyed when the bottom sheet is removed unless preserveScope is set to true.

preserveScope - {boolean=}: whether to PRESERVE the scope when the element is removed. Default is false.

controller - {string=}: The controller to associate with this bottom sheet.

locals - {string=}: An object containing key/value pairs. The keys will be used as NAMES of values to inject into the controller. For example, locals: {three: 3} would inject three into the controller with the value of 3.

clickOutsideToClose - {boolean=}: Whether the user can click outside the bottom sheet to close it. Default true.

escapeToClose - {boolean=}: Whether the user can PRESS escape to close the bottom sheet. Default true.

resolve - {object=}: Similar to locals, except it takes promises as values and the bottom sheet will not open until the promises resolve.

controllerAs - {string=}: An alias to assign the controller to on the scope.

parent - {element=}: The element to append the bottom sheet to. The parent may be a function, string, object, or null. Defaults to appending to the body of the root element (or the root element) of the application. e.g. angular.element(document.getElementById('content')) or "#content".

disableParentScroll - {boolean=}: Whether to disable scrolling while the bottom sheet is open. Default true.

$mdBottomSheet, an Angular Service, is used to open a bottom sheet over the application and provides a simple promise API.

Methods: templateUrl - {string=}: The url of an html template file that will be used as the content of the bottom sheet. Restrictions: the template must have an outer md-bottom-sheet element.

template - {string=}: Same as templateUrl, except this is an actual template string.

scope - {object=}: the scope to link the template / controller to. If none is specified, it will create a new child scope. This scope will be destroyed when the bottom sheet is removed unless preserveScope is set to true.

preserveScope - {boolean=}: whether to preserve the scope when the element is removed. Default is false.

controller - {string=}: The controller to associate with this bottom sheet.

locals - {string=}: An object containing key/value pairs. The keys will be used as names of values to inject into the controller. For example, locals: {three: 3} would inject three into the controller with the value of 3.

clickOutsideToClose - {boolean=}: Whether the user can click outside the bottom sheet to close it. Default true.

escapeToClose - {boolean=}: Whether the user can press escape to close the bottom sheet. Default true.

resolve - {object=}: Similar to locals, except it takes promises as values and the bottom sheet will not open until the promises resolve.

controllerAs - {string=}: An alias to assign the controller to on the scope.

parent - {element=}: The element to append the bottom sheet to. The parent may be a function, string, object, or null. Defaults to appending to the body of the root element (or the root element) of the application. e.g. angular.element(document.getElementById('content')) or "#content".

disableParentScroll - {boolean=}: Whether to disable scrolling while the bottom sheet is open. Default true.



Discussion

No Comment Found