You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib/input/input.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,8 @@ A placeholder for the input can be specified in one of two ways: either using th
62
62
attribute on the `input` or `textarea`, or using an `md-placeholder` element in the
63
63
`md-input-container`. Using both will raise an error.
64
64
65
-
Global default placeholder options can be specified by setting the `MD_PLACEHOLDER_GLOBAL_OPTIONS` provider. This setting will apply to all components that support the floating placeholder.
65
+
Global default placeholder options can be specified by setting the `MD_PLACEHOLDER_GLOBAL_OPTIONS`
66
+
provider. This setting will apply to all components that support the floating placeholder.
66
67
67
68
```ts
68
69
@NgModule({
@@ -110,12 +111,12 @@ warn color.
110
111
111
112
### Custom Error Matcher
112
113
113
-
By default, error messages are shown when the control is invalid and either the user has interacted with
114
-
(touched) the element or the parent form has been submitted. If you wish to override this
114
+
By default, error messages are shown when the control is invalid and either the user has interacted
115
+
with (touched) the element or the parent form has been submitted. If you wish to override this
115
116
behavior (e.g. to show the error as soon as the invalid control is dirty or when a parent form group
116
117
is invalid), you can use the `errorStateMatcher` property of the `mdInput`. To use this property,
117
-
create a function in your component class that returns a boolean. A result of `true` will display
118
-
the error messages.
118
+
create an `ErrorStateMatcher` object in your component class that has a `isErrorSate` function which
119
+
returns a boolean. A result of `true` will display the error messages.
0 commit comments