Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs: fix incorrect destructuring in resource loader example #61988

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

Closed
wants to merge 1 commit into from

Conversation

Elab4d1
Copy link
Contributor

@Elab4d1 Elab4d1 commented Jun 10, 2025

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?

In the resource usage example within the "Aborting requests" section of the signals/resource.md guide, the destructured parameter is incorrectly named request.

loader: ({request, abortSignal}) => fetch(`users/${request.id}`, { signal: abortSignal });

This is inconsistent with the expected ResourceLoaderParams type, which defines the field as params.

Issue Number: N/A

What is the new behavior?

The code example now correctly uses:

loader: ({params, abortSignal}) => fetch(`users/${params.id}`, { signal: abortSignal });

This change aligns the example with the actual resource API and avoids potential confusion or incorrect usage.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link

google-cla bot commented Jun 10, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pullapprove pullapprove bot requested a review from jelbourn June 10, 2025 15:48
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jun 10, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 10, 2025
@Elab4d1 Elab4d1 force-pushed the docs-fix-resource-loader branch from 34e97c9 to f698cee Compare June 10, 2025 15:52
Copy link
Member

@JeanMeche JeanMeche 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 this

@JeanMeche JeanMeche removed the request for review from jelbourn June 10, 2025 15:54
@JeanMeche JeanMeche added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Jun 10, 2025
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 3586411.

The changes were merged into the following branches: main, 20.0.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.