Skip to content

Incorrect comment about signal update behavior in Angular documentation example #67090

@rekha-technogise

Description

@rekha-technogise

Describe the problem that you experienced

In the Angular official documentation example for @component, the inline comment says: “Always updates when the value of the name signal changes.” However, in the code snippet, there is no name signal defined. The signal defined is theme = signal('dark'), and the template uses theme(). This makes the comment incorrect and confusing because it references a signal that does not exist in the example.

Enter the URL of the topic with the problem

https://angular.dev/guide/templates/binding

Describe what you were looking for in the documentation

I was trying to understand how Angular signals work inside a component template and how template updates are triggered when a signal value changes.

Describe the actions that led you to experience the problem

I opened the Angular documentation page about signals and components, reviewed the provided example code, and noticed that the comment refers to a name signal even though only a theme signal is defined in the example.

Describe what you want to experience that would fix the problem

I expect the inline comment in the documentation example to correctly reference the theme signal instead of name. The comment should say: “Always updates when the value of the theme signal changes.” Alternatively, if the example is meant to demonstrate a name signal, then the code should define name = signal(...) and use it consistently. The documentation should be internally consistent so that beginners are not confused about which signal is being referenced.

Add a screenshot if that helps illustrate the problem

Image

If this problem caused an exception or error, please paste it here

This issue did not cause a runtime exception or compilation error. The code works as written. The problem is a documentation inconsistency that may mislead readers.

If the problem is browser-specific, please specify the device, OS, browser, and version

The issue is not browser-specific. It appears to be a content error in the documentation itself.
Device: MacBook
OS: macOS
Browser: Google Chrome
Version: 145.0.0.0

Provide any additional information here in as much as detail as you can

This example appears in the section explaining how Angular signals trigger template updates. Since signals are a relatively new feature, clarity is especially important. Beginners may assume that there is some hidden name signal or may think they missed part of the example. Ensuring the variable names in comments and code match will improve readability and reduce confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docsRelated to the documentationgood first issueAn issue that is suitable for first-time contributors; often a documentation issue.help wantedAn issue that is suitable for a community contributor (based on its complexity/scope).

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions