RangeValueAccessor
directive
The ControlValueAccessor
for writing a range value and listening to range input changes.
The value accessor is used by the FormControlDirective
, FormControlName
, and NgModel
directives.
API
Description
Usage Notes
class RangeValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {}
writeValue
void
Sets the "value" property on the input element.
@paramvalue
any
@returns
void
registerOnChange
void
Registers a function called when the control value changes.
@paramfn
(_: number | null) => void
@returns
void
onChange
(_: any) => void
The registered callback function called when a change or input event occurs on the input element.
onTouched
() => void
The registered callback function called when a blur event occurs on the input element.
setProperty
void
Helper method that sets a property on a target element using the current Renderer implementation.
@paramkey
string
@paramvalue
any
@returns
void
registerOnTouched
void
Registers a function called when the control is touched.
@paramfn
() => void
@returns
void
setDisabledState
void
Sets the "disabled" property on the range input element.
@paramisDisabled
boolean
@returns
void
Jump to details