@@ -109,7 +109,7 @@ function MdBottomSheetDirective($mdBottomSheet) {
109
109
* </hljs>
110
110
*/
111
111
112
- /**
112
+ /**
113
113
* @ngdoc method
114
114
* @name $mdBottomSheet#show
115
115
*
@@ -124,39 +124,42 @@ function MdBottomSheetDirective($mdBottomSheet) {
124
124
* Newer versions of Angular will throw a `Possibly unhandled rejection` exception if you forget
125
125
* this.</em>
126
126
*
127
- * @param {object } optionsOrPreset Either provide an `$mdBottomSheetPreset` defined during the config phase or
128
- * an options object, with the following properties:
127
+ * @param {Object } optionsOrPreset Either provide an `$mdBottomSheetPreset` defined during the
128
+ * config phase or an options object, with the following properties:
129
129
*
130
130
* - `templateUrl` - `{string=}`: The url of an html template file that will
131
131
* be used as the content of the bottom sheet. Restrictions: the template must
132
132
* have an outer `md-bottom-sheet` element.
133
133
* - `template` - `{string=}`: Same as templateUrl, except this is an actual
134
134
* template string.
135
- * - `scope` - `{object=}`: the scope to link the template / controller to. If none is specified, it will create a new child scope.
136
- * This scope will be destroyed when the bottom sheet is removed unless `preserveScope` is set to true.
137
- * - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed. Default is false
135
+ * - `scope` - `{Object=}`: the scope to link the template / controller to. If none is specified,
136
+ * it will create a new child scope. This scope will be destroyed when the bottom sheet is
137
+ * removed unless `preserveScope` is set to true.
138
+ * - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed.
139
+ * Default is false
138
140
* - `controller` - `{string=}`: The controller to associate with this bottom sheet.
139
- * - `locals` - `{string=}`: An object containing key/value pairs. The keys will
140
- * be used as names of values to inject into the controller. For example,
141
- * `locals: {three: 3}` would inject `three` into the controller with the value
142
- * of 3.
141
+ * - `locals` - `{string=}`: An object containing key/value pairs. The keys will be used as names
142
+ * of values to inject into the controller. For example, `locals: {three: 3}` would inject
143
+ * `three` into the controller with the value of 3.
143
144
* - `clickOutsideToClose` - `{boolean=}`: Whether the user can click outside the bottom sheet to
144
145
* close it. Default true.
145
- * - `bindToController` - `{boolean=}`: When set to true, the locals will be bound to the controller instance.
146
+ * - `bindToController` - `{boolean=}`: When set to true, the locals will be bound to the
147
+ * controller instance and available in it's $onInit function.
146
148
* - `disableBackdrop` - `{boolean=}`: When set to true, the bottomsheet will not show a backdrop.
147
149
* - `escapeToClose` - `{boolean=}`: Whether the user can press escape to close the bottom sheet.
148
150
* Default true.
149
- * - `isLockedOpen` - `{boolean=}`: Disables all default ways of closing the bottom sheet. **Note:** this will override
150
- * the `clickOutsideToClose` and `escapeToClose` options, leaving only the `hide` and `cancel`
151
- * methods as ways of closing the bottom sheet. Defaults to false.
152
- * - `resolve` - `{object =}`: Similar to locals, except it takes promises as values
151
+ * - `isLockedOpen` - `{boolean=}`: Disables all default ways of closing the bottom sheet.
152
+ * **Note:** this will override the `clickOutsideToClose` and `escapeToClose` options, leaving
153
+ * only the `hide` and `cancel` methods as ways of closing the bottom sheet. Defaults to false.
154
+ * - `resolve` - `{Object =}`: Similar to locals, except it takes promises as values
153
155
* and the bottom sheet will not open until the promises resolve.
154
156
* - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope.
155
- * - `parent` - `{element=}`: The element to append the bottom sheet to. The `parent` may be a `function`, `string`,
156
- * `object`, or null. Defaults to appending to the body of the root element (or the root element) of the application.
157
+ * - `parent` - `{element=}`: The element to append the bottom sheet to. The `parent` may be a
158
+ * `function`, `string`, `Object`, or null. Defaults to appending to the body of the root element
159
+ * (or the root element) of the application.
157
160
* e.g. angular.element(document.getElementById('content')) or "#content"
158
- * - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the bottom sheet is open.
159
- * Default true.
161
+ * - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the bottom sheet is
162
+ * open. Default true.
160
163
*
161
164
* @returns {promise } A promise that can be resolved with `$mdBottomSheet.hide()` or
162
165
* rejected with `$mdBottomSheet.cancel()`.
@@ -218,9 +221,7 @@ function MdBottomSheetProvider($$interimElementProvider) {
218
221
isLockedOpen : false
219
222
} ;
220
223
221
-
222
- function onShow ( scope , element , options , controller ) {
223
-
224
+ function onShow ( scope , element , options ) {
224
225
element = $mdUtil . extractElementByName ( element , 'md-bottom-sheet' ) ;
225
226
226
227
// prevent tab focus or click focus on the bottom-sheet container
@@ -303,8 +304,8 @@ function MdBottomSheetProvider($$interimElementProvider) {
303
304
304
305
/**
305
306
* Adds the drag gestures to the bottom sheet.
306
- * @param {angular. JQLite } element where CSS transitions will be applied
307
- * @param {angular. JQLite } parent used for registering gesture listeners
307
+ * @param {JQLite } element where CSS transitions will be applied
308
+ * @param {JQLite } parent used for registering gesture listeners
308
309
* @return {Function } function that removes gesture listeners that were set up by
309
310
* registerGestures()
310
311
*/
@@ -348,7 +349,5 @@ function MdBottomSheetProvider($$interimElementProvider) {
348
349
}
349
350
}
350
351
}
351
-
352
352
}
353
-
354
353
}
0 commit comments