Closed lonevox closed 1 week ago
The reproduction project isn't working. I will try and fix it tomorrow.
The reproduction project is fixed. I've updated the instructions accordingly. Unfortunately the bug doesn't appear in StackBlitz (it seems to fail too early) so you need to download the StackBlitz project and run it locally.
You should use both renderProviders
and clientProviders
so it registers the providers on server render and client hydration
Please provide the environment you discovered this bug in.
Astro preview on local machine.
Reproduction (this uses Angular 16 as that is what my project uses): https://stackblitz.com/edit/withastro-astro-zktjyx?file=astro%2Fpackage.json
NOTE: The bug can't be encountered in StackBlitz. You must download the StackBlitz project and run it locally.
The reproduction project
./my-workspace
directory is a fresh Angular workspace containing a library project. This library exports a single Angular serviceMyLibService
that depends onHttpClient
. The reproduction project./astro
directory is a fresh Astro project with an index page containing a component calledTestComponent
. The component depends onMyLibService
, and as such needs to define a client provider for theHttpClient
.To encounter the bug, run the following commands in the reproduction project:
The Astro project should have run correctly (there should be a webpage with the text "my-lib works!"). Cancel the running page and execute the following commands:
The result is a blank page with a
NG0203
error in the console.Which area/package is the issue in?
astro-angular
Description
Unfortunately this is a difficult bug to describe, but hopefully the issue title and bug reproduction in the first section explain it well enough.
Please provide the exception or error you saw
NG0203
Other information
No response
I would be willing to submit a PR to fix this issue