Skip to content

Commit 030ffb2

Browse files
docs: reword signal queries section (angular#57921)
Reword the Results availability timing section based on the feedback in angular#56866 Fixes angular#56866 PR Close angular#57921
1 parent a7eff3f commit 030ffb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adev/src/content/guide/signals/queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class App {
147147

148148
## Results availability timing
149149

150-
A signal query authoring functions will be executed as part of the directive instance construction. This happens before we could create a query instance and execute the template’s creation mode to collect any matches. As a consequence, there is a period of time where the signal instance was created (and can be read) but no query results could have been collected. By default Angular will return `undefined` (for child queries) or an empty array (for children queries) before results are available. Required queries will throw if accessed at this point.
150+
Signal query declaration functions (ex.: `viewChild`) will be executed while the directive is instantiated. This happens before a template is rendered and before Angular can collect any query matches. As a consequence, there is a period of time where the signal instance was created (and can be read) but no query results could have been collected. By default Angular will return `undefined` (for child queries) or an empty array (for children queries) before results are available. Required queries will throw if accessed at this point.
151151

152152
Angular computes signal-based query results lazily, on demand. This means that query results are not collected unless there is a code path that reads the signal.
153153

0 commit comments

Comments
 (0)