-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
New Angular renderer throws "Converting circular structure to JSON" when using InjectionToken with options #15333
Comments
I took a quick look at this, since I already had an idea what may have been happening, and found a fix, but I don't have time to test it right now. Until I have more time to test it, maybe later this afternoon, I will just add what I found here. The problem seems to be how Angular adds Storybook's The line in |
Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.11 containing PR #15410 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.3 containing PR #15410 that references this issue. Upgrade today to the
|
The issue still persists when we pass FormGroup as a args in angular 8 and storybook 6.3.6.
|
Describe the bug
Create an Angular Injection Token that uses the second parameter "options" to pass an object:
Create a story that with
moduleMetadata
that provides that token (either directly or by importing a module that provides that token):The story shows the following error in the browser:
It works if I
angularLegacyRendering
to true ORnew InjectionToken('DEMO_TWO')
)To Reproduce
The repo is created with
npx sb@next repro
Repo: https://github.com/rothsandro/storybook-injection-token-repro
Relevant files:
I can't deploy it, the build hangs at "info => Output directory: ...".
I created a second repro project without changing anything in the code and directly run the build - same result.
System
Additional context
We use https://ngneat.github.io/transloco/ for translation which uses such an injection token.
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: