Skip to content

Commit f104101

Browse files
willshowellkara
authored andcommitted
docs(input): remove extra parens and fix nits (#6614)
1 parent dde6e19 commit f104101

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/input/input.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ elements inside `md-form-field` as well. This includes Angular directives such a
1414

1515
The only limitations are that the `type` attribute can only be one of the values supported by
1616
`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.
1818

1919
### Supported `input` types
2020

@@ -56,7 +56,7 @@ text. When text is present, the indicative text will float above this input zone
5656
The `floatPlaceholder` attribute of `md-form-field` can be set to `never` to hide the
5757
indicative text instead when text is present in the input.
5858

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.
6060

6161
A placeholder for the input can be specified in one of two ways: either using the `placeholder`
6262
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
6868
```ts
6969
@NgModule({
7070
providers: [
71-
{provide: MD_PLACEHOLDER_GLOBAL_OPTIONS, useValue: { float: 'always' }}
71+
{provide: MD_PLACEHOLDER_GLOBAL_OPTIONS, useValue: {float: 'always'}}
7272
]
7373
})
7474
```
@@ -81,8 +81,8 @@ Here are the available global options:
8181

8282
### Prefix and Suffix
8383

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.
8686

8787
Adding the `mdPrefix` attribute to an element inside the `md-form-field` will designate it as
8888
the prefix. Similarly, adding `mdSuffix` will designate it as the suffix.
@@ -129,18 +129,18 @@ the error messages.
129129
function myErrorStateMatcher(control: FormControl, form: FormGroupDirective | NgForm): boolean {
130130
// Error when invalid control is dirty, touched, or submitted
131131
const isSubmitted = form && form.submitted;
132-
return !!(control.invalid && (control.dirty || control.touched || isSubmitted)));
132+
return !!(control.invalid && (control.dirty || control.touched || isSubmitted));
133133
}
134134
```
135135

136136
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
138138
input errors to show when the input is dirty and invalid.
139139

140140
```ts
141141
@NgModule({
142142
providers: [
143-
{provide: MD_ERROR_GLOBAL_OPTIONS, useValue: { errorStateMatcher: showOnDirtyErrorStateMatcher }}
143+
{provide: MD_ERROR_GLOBAL_OPTIONS, useValue: {errorStateMatcher: showOnDirtyErrorStateMatcher}}
144144
]
145145
})
146146
```

0 commit comments

Comments
 (0)