-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Angular] Add moduleMetadata once #2694
Comments
I agree with the use case but I think something like:
would be more in line with the API. |
We had the same requirement. I created this decorator, which can be used as @amcdnl suggested: import { NgModuleMetadata } from '@storybook/angular/dist/client/preview/angular/types';
export const moduleMetadata = (metadata: Partial<NgModuleMetadata>) =>
(context: () => any) => ({
moduleMetadata: metadata,
...context()
}); Individual stories should be able to override the default metadata with their own. A more robust implementation could try to merge the two. |
@jonrimmer - Very nice! You should PR this. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks! |
Issue details
Feature Request: It can get tedious adding the same moduleMetadata for every story. Could it be possible to add it once at the parent level? I added a code snippet bellow to help clarify my request.
Screenshots / Screencast / Code Snippets (Optional)
Current:
AppMoudle
must be provided for each story.Example:
AppMoudle
is imported before any stories are added.The text was updated successfully, but these errors were encountered: