Skip to content

Conversation

@cexbrayat
Copy link
Member

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?

As the function in the factory was named httpResourceRef, error NG0203 had with the following message:

Error: NG0203: httpResourceRef() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.dev/errors/NG0203

What is the new behavior?

The new message mentions httpRessource as shown by the added unit test

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from AndrewKushnir February 19, 2025 21:02
@angular-robot angular-robot bot added the area: common Issues related to APIs in the @angular/common package label Feb 19, 2025
@ngbot ngbot bot added this to the Backlog milestone Feb 19, 2025
@AndrewKushnir AndrewKushnir requested review from alxhub and removed request for AndrewKushnir February 20, 2025 00:32
@JeanMeche JeanMeche requested review from thePunderWoman and removed request for alxhub April 29, 2025 20:02
@JeanMeche JeanMeche force-pushed the fix/http-resource-ng0203 branch from c3785e4 to 24d8a46 Compare April 29, 2025 20:02
@JeanMeche
Copy link
Member

Nice catch — the error message highlights the importance of the function name.

Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

As the function in the factory was named `httpResourceRef`, error NG0203 had with the following message:

```
Error: NG0203: httpResourceRef() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.dev/errors/NG0203
```
@thePunderWoman thePunderWoman force-pushed the fix/http-resource-ng0203 branch from 24d8a46 to 2328615 Compare April 30, 2025 10:52
@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release labels Apr 30, 2025
@ngbot
Copy link

ngbot bot commented Apr 30, 2025

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "google-internal-tests" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken main, please try rebasing to main and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@thePunderWoman
Copy link
Contributor

Caretaker note: this is safe to merge. the presubmit failures are unrelated.

@thePunderWoman thePunderWoman added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Apr 30, 2025
@mmalerba
Copy link
Contributor

This PR was merged into the repository by commit fc4a56d.

The changes were merged into the following branches: main

@mmalerba mmalerba closed this in fc4a56d Apr 30, 2025
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants