• Overview
@angular/forms/signals

TransformedValueOptions

interface

Options for transformedValue.

API

    
      interface TransformedValueOptions<TValue, TRaw> {  parse: (rawValue: TRaw) => ParseResult<TValue>;  format: (value: TValue) => TRaw;}
    
    

parse

(rawValue: TRaw) => ParseResult<TValue>

Parse the raw value into the model value.

Should return an object containing the parsed result, which may contain:

  • value: The parsed model value. If undefined, the model will not be updated.
  • errors: Any parse errors encountered. If undefined, no errors are reported.

format

(value: TValue) => TRaw

Format the model value into the raw value.

Jump to details