NG.I · Angular 22 practice question
A developer is building a parent component that needs to synchronize a local state variable, `currentSetting`, with a child component's input property, `settingValue`, which is designed to update the parent when changed. Which binding syntax should the parent use in its template to achieve this automatic two-way synchronization?
<app-child [(settingValue)]="currentSetting" />
Check answer and explanation
Correct answer: [(settingValue)]="currentSetting"
Explanation
The syntax `[(settingValue)]="currentSetting"` is the mechanism described for linking a plain property to a model input, ensuring both components' values remain in sync.
Common trap
Using only `settingValue="currentSetting"` would only push data down from the parent to the child, failing to propagate changes back up to the parent's state.
Source: Angular docs: Accepting data with input properties — Two-way binding with plain properties
Checked against the cited text on 2026-11-25.