MCPcopy Index your code
hub / github.com/angular/angular / reset

Method reset

packages/forms/src/model/form_control.ts:303–303  ·  view source on GitHub ↗

* Resets the form control, marking it `pristine` and `untouched`, and resetting * the value. The new value will be the provided value (if passed), `null`, or the initial value * if `nonNullable` was set in the constructor via FormControlOptions. * * ```ts * // By default, the

(
    formState?: TValue | FormControlState<TValue>,
    options?: {
      onlySelf?: boolean;
      emitEvent?: boolean;
      overwriteDefaultValue?: boolean;
    },
  )

Source from the content-addressed store, hash-verified

301 *
302 */
303 reset(
304 formState?: TValue | FormControlState<TValue>,
305 options?: {
306 onlySelf?: boolean;

Callers

nothing calls this directly

Implementers 1

SignalFormControlpackages/forms/signals/compat/src/sign

Calls 5

_applyFormStateMethod · 0.95
setValueMethod · 0.95
markAsPristineMethod · 0.45
markAsUntouchedMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected