Angular · Middle · Question 39 of 75
What does nonNullable: true change in typed reactive forms?
- ✓Correct answer:
reset()returns the control to its initial value, so its type doesn't includenull - 2The control can't be empty - it becomes required
- 3The control ignores
nullassigned bysetValue
Explanation
By default a control's type is T | null because reset() sets it to null. NonNullableFormBuilder (inject(FormBuilder).nonNullable) applies this to every control.