dominique-mueller / angular-notifier

A well designed, fully animated, highly customizable, and easy-to-use notification library for your Angular application.
https://www.npmjs.com/package/angular-notifier
MIT License
247 stars 68 forks source link

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

Open phil123456 opened 4 years ago

phil123456 commented 4 years ago

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 commented 4 years ago

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

dominique-mueller commented 3 years ago

Styling-related issues might have been fixed with https://github.com/dominique-mueller/angular-notifier/pull/186, released with 6.0.2 and all later versions. Feel free to check if it works without any workarounds :)

MatthiasvB commented 2 years ago

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 commented 2 years ago

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";