@@ -45,28 +45,31 @@ if (window._mdMocksIncluded) {
45
45
* @restrict E
46
46
*
47
47
* @description
48
- * `<md-input-container>` is the parent of any input or textarea element.
48
+ * `<md-input-container>` is the parent of any input or textarea element. It can also optionally
49
+ * wrap `<md-select>` elements so that they will be formatted for use in a form.
49
50
*
50
- * Input and textarea elements will not behave properly unless the md-input-container
51
- * parent is provided.
51
+ * Input and textarea elements will not behave properly unless the md-input-container parent is
52
+ * provided.
52
53
*
53
- * A single `<md-input-container>` should contain only one `<input>` element, otherwise it will throw an error.
54
+ * A single `<md-input-container>` should contain only one `<input>` or `<md-select>` element,
55
+ * otherwise it will throw an error.
54
56
*
55
- * <b>Exception:</b> Hidden inputs (`<input type="hidden" />`) are ignored and will not throw an error, so
56
- * you may combine these with other inputs.
57
+ * <b>Exception:</b> Hidden inputs (`<input type="hidden" />`) are ignored and will not throw an
58
+ * error, so you may combine these with other inputs.
57
59
*
58
- * <b>Note:</b> When using `ngMessages` with your input element, make sure the message and container elements
59
- * are *block* elements, otherwise animations applied to the messages will not look as intended. Either use a `div` and
60
- * apply the `ng-message` and `ng-messages` classes respectively, or use the `md-block` class on your element.
60
+ * <b>Note:</b> When using `ngMessages` with your input element, make sure the message and container
61
+ * elements are *block* elements, otherwise animations applied to the messages will not look as
62
+ * intended. Either use a `div` and apply the `ng-message` and `ng-messages` classes respectively,
63
+ * or use the `md-block` class on your element.
61
64
*
62
- * @param md-is-error {expression=} When the given expression evaluates to true, the input container
63
- * will go into error state. Defaults to erroring if the input has been touched and is invalid.
64
- * @param md-no-float {boolean=} When present, `placeholder` attributes on the input will not be converted to floating
65
- * labels.
65
+ * @param {expression= } md-is-error When the given expression evaluates to `true`, the input
66
+ * container will go into the error state. Defaults to erroring if the input has been touched and
67
+ * is invalid.
68
+ * @param {boolean= } md-no-float When present, `placeholder` attributes on the input will not be
69
+ * converted to floating labels.
66
70
*
67
71
* @usage
68
72
* <hljs lang="html">
69
- *
70
73
* <md-input-container>
71
74
* <label>Username</label>
72
75
* <input type="text" ng-model="user.name">
@@ -77,6 +80,11 @@ if (window._mdMocksIncluded) {
77
80
* <textarea ng-model="user.description"></textarea>
78
81
* </md-input-container>
79
82
*
83
+ * <md-input-container>
84
+ * <md-select ng-model="user.state" placeholder="State of Residence">
85
+ * <md-option ng-value="state" ng-repeat="state in states">{{ state }}</md-option>
86
+ * </md-select>
87
+ * </md-input-container>
80
88
* </hljs>
81
89
*
82
90
* <h3>When disabling floating labels</h3>
@@ -85,7 +93,6 @@ if (window._mdMocksIncluded) {
85
93
* <md-input-container md-no-float>
86
94
* <input type="text" placeholder="Non-Floating Label">
87
95
* </md-input-container>
88
- *
89
96
* </hljs>
90
97
*/
91
98
function mdInputContainerDirective ( $mdTheming , $parse ) {
@@ -194,11 +201,12 @@ function labelDirective() {
194
201
* will be logged in the console if not present.
195
202
* @param {string= } placeholder An alternative approach to using aria-label when the label is not
196
203
* PRESENT. The placeholder text is copied to the aria-label attribute.
197
- * @param md-no-autogrow {boolean=} When present, textareas will not grow automatically.
198
- * @param md-no-asterisk {boolean=} When present, an asterisk will not be appended to the inputs floating label
199
- * @param md-no-resize {boolean=} Disables the textarea resize handle.
204
+ * @param {boolean= } md-no-autogrow When present, textareas will not grow automatically.
205
+ * @param {boolean= } md-no-asterisk When present, an asterisk will not be appended to the inputs
206
+ * floating label.
207
+ * @param {boolean= } md-no-resize Disables the textarea resize handle.
200
208
* @param {number= } max-rows The maximum amount of rows for a textarea.
201
- * @param md-detect-hidden {boolean=} When present, textareas will be sized properly when they are
209
+ * @param { boolean= } md-detect-hidden When present, textareas will be sized properly when they are
202
210
* revealed after being hidden. This is off by default for performance reasons because it
203
211
* guarantees a reflow every digest cycle.
204
212
*
0 commit comments