-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug] Angular Components #2647
Comments
Hello thank you for feedback, i have looked on your example, and at first story you trying to bootstrap app.component into another module, but i think it is not valid case (tell me if i wrong, i have checked and got exactly the same error with pure angular) At second example you are trying to render component, that exported from nested module directly. And at that case i've got such error too with pure angular, example. |
Any ideas on the styles? The others I can work around. |
Yeah, the explanation for this behavior is that we create an inner module that contains our main component (this component dynamically renders each story). Since the nested
EDIT: For the first bug, it's true that we should change the name of our root node but that's not the source of the bug. Actually the same explanation applies: I'm also issuing a PR to change the name of our root node (it'll probably cause troubles eventually) |
@amcdnl , regarding the css: Css in this case used in two different context:
So we have a collision between css rules. What can you do: Use this feature for the Or add an exclusion for the const cssRule2 = config.module.rules.find(rule => rule.test && rule.test.toString() === '/\\.(html|css)$/');
if (cssRule2) {
cssRule2.exclude = /bootstrap\.css$/;
} |
I was just showing that 2 different ways of doing it. Neither worked for me. |
Fix released as |
@amcdnl , did you manage to make css working? |
Not sure we should be closing this one. Issues 1 and 2 have a workaround and an explanation so I think we're good with those (#2657 is not directly related). It looks like issue # 3 is still happening tho |
Oh sorry. It just stated "Issue: #2647" |
The following config worked me around the CSS issue.
|
Will close this one since there's a workaround for issue # 3 and, # 1 and # 2 work as expected. Also, there's related work happening in #2688 🎉 |
I have 3 different bugs I've identified in this repo: https://github.com/amcdnl/angular-storybook-issue
Basic
In the basic scenario, I import my app component and nothing renders.
Basic 2
In the basic 2 scenario, I use a component directly that has a nested module dependency and its not resolving that module. It throws the following errors:
CSS
The
boostrap.css
file includedconfig.js
is never injected.The text was updated successfully, but these errors were encountered: