NG.II · Angular 22 practice question
A developer implements a `computed` signal that relies on another signal. If the dependency signal updates, which mechanism ensures the computed signal's value is recalculated?
Check answer and explanation
Correct answer: Angular automatically establishes a 'live' connection, causing the computed signal to re-evaluate.
Explanation
The accurate statement is that Angular automatically establishes a 'live' connection, causing the computed signal to re-evaluate. This is because the evaluation of a `computed` signal initiates a reactive context within Angular, thereby setting up dependency tracking.
Common trap
The suggestion that the developer must manually call a `.trigger()` method on the computed signal after the dependency changes is misleading, as the system manages dependency tracking automatically. Furthermore, the assertion that the computed signal only updates when the component hosting it is re-rendered by the view engine is incorrect, as template rendering is just one of several contexts that trigger reactivity.
Source: Angular docs: guide/signals/overview — Reactive contexts
Checked against the cited text on 2026-11-25.