@@ -14,7 +14,7 @@ elements inside `md-form-field` as well. This includes Angular directives such a
14
14
15
15
The only limitations are that the ` type ` attribute can only be one of the values supported by
16
16
` mdInput ` and the native element cannot specify a ` placeholder ` attribute if the ` md-form-field `
17
- also contains a ` md-placeholder ` element.
17
+ also contains an ` md-placeholder ` element.
18
18
19
19
### Supported ` input ` types
20
20
@@ -56,7 +56,7 @@ text. When text is present, the indicative text will float above this input zone
56
56
The ` floatPlaceholder ` attribute of ` md-form-field ` can be set to ` never ` to hide the
57
57
indicative text instead when text is present in the input.
58
58
59
- When setting ` floatPlaceholder ` to ` always ` the floating label will always show above the input.
59
+ When setting ` floatPlaceholder ` to ` always ` , the floating label will always show above the input.
60
60
61
61
A placeholder for the input can be specified in one of two ways: either using the ` placeholder `
62
62
attribute on the ` input ` or ` textarea ` , or using an ` md-placeholder ` element in the
@@ -68,7 +68,7 @@ provider. This setting will apply to all components that support the floating pl
68
68
``` ts
69
69
@NgModule ({
70
70
providers: [
71
- {provide: MD_PLACEHOLDER_GLOBAL_OPTIONS , useValue: { float: ' always' }}
71
+ {provide: MD_PLACEHOLDER_GLOBAL_OPTIONS , useValue: {float: ' always' }}
72
72
]
73
73
})
74
74
```
@@ -81,8 +81,8 @@ Here are the available global options:
81
81
82
82
### Prefix and Suffix
83
83
84
- HTML can be included before, and after the input tag, as prefix or suffix. It will be underlined as
85
- per the Material specification, and clicking it will focus the input.
84
+ HTML can be included before and after the input tag, as a prefix or suffix. It will be underlined
85
+ as per the Material specification, and clicking it will focus the input.
86
86
87
87
Adding the ` mdPrefix ` attribute to an element inside the ` md-form-field ` will designate it as
88
88
the prefix. Similarly, adding ` mdSuffix ` will designate it as the suffix.
@@ -129,18 +129,18 @@ the error messages.
129
129
function myErrorStateMatcher(control : FormControl , form : FormGroupDirective | NgForm ): boolean {
130
130
// Error when invalid control is dirty, touched, or submitted
131
131
const isSubmitted = form && form .submitted ;
132
- return !! (control .invalid && (control .dirty || control .touched || isSubmitted ))) ;
132
+ return !! (control .invalid && (control .dirty || control .touched || isSubmitted ));
133
133
}
134
134
```
135
135
136
136
A global error state matcher can be specified by setting the ` MD_ERROR_GLOBAL_OPTIONS ` provider. This applies
137
- to all inputs. For convenience, ` showOnDirtyErrorStateMatcher ` is available in order to globally cause
137
+ to all inputs. For convenience, ` showOnDirtyErrorStateMatcher ` is available in order to globally set
138
138
input errors to show when the input is dirty and invalid.
139
139
140
140
``` ts
141
141
@NgModule ({
142
142
providers: [
143
- {provide: MD_ERROR_GLOBAL_OPTIONS , useValue: { errorStateMatcher: showOnDirtyErrorStateMatcher }}
143
+ {provide: MD_ERROR_GLOBAL_OPTIONS , useValue: {errorStateMatcher: showOnDirtyErrorStateMatcher }}
144
144
]
145
145
})
146
146
```
0 commit comments