Skip to content
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

css not loading & ~/angular-notifier/styles not found #192

Open
phil123456 opened this issue Sep 14, 2020 · 4 comments
Open

css not loading & ~/angular-notifier/styles not found #192

phil123456 opened this issue Sep 14, 2020 · 4 comments
Labels
needs repro Indicates that this issue needs a reproduction before further steps can be taken type: bug Indicates an unintended behaviour, unexpected problem, crash

Comments

@phil123456
Copy link

Hello

just added @import 'angular-notifier/styles' to my app css and no css are loaded when using the notifications

~/angular-notifier/styles was also not found when compiling

(also use use this.notifier but the injected service is notifierService)

can you update your documentation please ?

thanks

@phil123456
Copy link
Author

ok I found I had to inject angular-notifier/styles.scss and disable viewencapsulation

@dominique-mueller dominique-mueller added type: bug Indicates an unintended behaviour, unexpected problem, crash needs repro Indicates that this issue needs a reproduction before further steps can be taken labels Mar 10, 2021
@dominique-mueller
Copy link
Owner

Styling-related issues might have been fixed with #186, released with 6.0.2 and all later versions. Feel free to check if it works without any workarounds :)

@MatthiasvB
Copy link

I have upgraded from Angular 12 to Angular 14 and at the same time from angular-notifier 5 (I believe) to 11. I also experience issues regarding style import. However, I can only resolve them in a different (not very nice) way.

The project fails to build whenever I use any combination of /@import "~?angular-notifier\/styles(\.scss)?";/.

Interestingly, @import "angular-notifier/styles/core"; works, but then I'm missing styles.

The only import that works is the super explicit @import "node_modules/angular-notifier/styles/core";. But I would prefer to have no explicit reference to node_modules.

I wonder what the issue is. The fact that the import of the core styles works makes be believe that the webpack configuration to resolve the import is correct, but that something causes problems specifically with the styles. I wonder whether this is related to the fact that there is a styles/ directory and a styles.scss file?

@danitor1
Copy link

Tuve el mismo problema con la importación en estilos. La solución es, en su styles.scss:
@import "../node_modules/angular-notifier/styles.scss";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Indicates that this issue needs a reproduction before further steps can be taken type: bug Indicates an unintended behaviour, unexpected problem, crash
Projects
None yet
Development

No branches or pull requests

4 participants