import {TextFieldModule} from '@angular/cdk/text-field';
AutofillMonitor
An injectable service that can be used to monitor the autofill state of an input. Based on the following blog post: https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
monitor | |
---|---|
Monitor for changes in the autofill state of the given input element. |
|
Parameters | |
element Element
|
The element to monitor. |
Returns | |
Observable<AutofillEvent>
|
A stream of autofill state changes. |
monitor | |
---|---|
Monitor for changes in the autofill state of the given input element. |
|
Parameters | |
element ElementRef<Element>
|
The element to monitor. |
Returns | |
Observable<AutofillEvent>
|
A stream of autofill state changes. |
stopMonitoring | |
---|---|
Parameters | |
elementOrRef Element | ElementRef<Element>
|
|
CdkAutofill
A directive that can be used to monitor the autofill state of an input.
Selector: [cdkAutofill]
Name | Description |
---|---|
@Output()
|
Emits when the autofill state of the element changes. |
CdkTextareaAutosize
Directive to automatically resize a textarea to fit its content.
Selector: textarea[cdkTextareaAutosize]
Exported as: cdkTextareaAutosizeName | Description |
---|---|
@Input('cdkTextareaAutosize')
|
Whether autosizing is enabled or not |
@Input('cdkAutosizeMaxRows')
|
Maximum amount of rows in the textarea. |
@Input('cdkAutosizeMinRows')
|
Minimum amount of rows in the textarea. |
reset | |
---|---|
Resets the textarea to it's original size |
resizeToFitContent | |
---|---|
Resize the textarea to fit its content. |
|
Parameters | |
force boolean = false
|
Whether to force a height recalculation. By default the height will be recalculated only if the value changed since the last call. |
AutofillEvent
An event that is emitted when the autofill state of an input changes.
type AutofillEvent = {
target: Element;
isAutofilled: boolean;
};