From.value will not show disabled controls so use getRawValue() ~ http://azanebrain.github.io/news/angular-snafoo-form-value-vs-getrawvalues/
✓ Published0🌍 Public
Aackuser
Last edited Jan 24, 2018
Created on Jul 23, 2018
This example demonstrates how Angular FormGroup’s `.value` property omits disabled controls, while `.getRawValue()` includes them. The code constructs a reactive form with one enabled control (`enabledControl`) and one disabled control (`disabledControl`), then logs both outputs to the console. Using `FormBuilder.group`, it shows that `.value` returns only `{ enabledControl: 'hello' }`, whereas `.getRawValue()` returns both controls including the disabled one’s value (`'world'`). The example relies on Angular’s reactive forms APIs, specifically `FormGroup`, `FormBuilder`, and the two accessor methods.
AI-generated description