Skip to content

docs: update binding.md to use signals #62606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robertIsaac
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

it uses the old class properties

Issue Number: N/A

What is the new behavior?

it uses signals

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from bencodezen July 12, 2025 09:08
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jul 12, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 12, 2025
JeanMeche

This comment was marked as outdated.

@JeanMeche
Copy link
Member

Thank for the suggestion, we indeed would want to use signals in this guide but we also want to introduce the topic slightly. I've pushed some updates and we'll pick it up from here with @bencodezen.

Copy link

Deployed adev-preview for f7d8523 to: https://ng-dev-previews-fw--pr-angular-angular-62606-adev-prev-jd05r3kq.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@robertIsaac
Copy link
Contributor Author

@JeanMeche great 👍
Should I make more PRs when I see other pages as well?
Because rn it's a bit confusing for new people since some pages are using signals and some aren't

@JeanMeche
Copy link
Member

We'll have a look ourselves to make signals more widespread across the docs.
The best would be to wait for us to do a global review on this !

Thanks for you help anyway !

theme = signal('dark');
}
```
For more details, see the [Signals guide](/guide/signals).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For more details, see the [Signals guide](/guide/signals).

Since we link the signals guide already in the introductory paragraph, I don't think this line is necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are suggesting the remove the whole sentence or just the link ?

@@ -25,9 +25,25 @@ In this example, when the snippet is rendered to the page, Angular will replace
<p>Your color preference is dark.</p>
```

In addition to evaluating the expression at first render, Angular also updates the rendered content when the expression's value changes.
Bindings that change over time should read values from [signals](/guide/signals). Angular tracks the signals read in the template, and updates the rendered page when those signal values changes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Bindings that change over time should read values from [signals](/guide/signals). Angular tracks the signals read in the template, and updates the rendered page when those signal values changes.
Bindings that change over time should read values from [signals](/guide/signals). Angular tracks the signals read in the template, and updates the rendered page when those signal values change.

```angular-ts
@Component({
template: `
<p>{{welcomeMessage}}</p> <!-- Does not necessarily update when `welcomeMessage` changes. -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p>{{welcomeMessage}}</p> <!-- Does not necessarily update when `welcomeMessage` changes. -->
<!-- Does not necessarily update when `welcomeMessage` changes. -->
<p>{{ welcomeMessage }}</p>

Copy link
Contributor

@bencodezen bencodezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR to update this guide @robertIsaac! I've left some suggested changes. Let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adev: preview area: docs Related to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants