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

Angular 12 issue with NotifierOptions #236

Open basilismt8 opened 2 years ago

basilismt8 commented 2 years ago

Hello!!! I have a issue with angular 12 and NotifierOptions. I did all the config correctly as you have on the package page (I also did it for angular 7 and I had no issue), but as you will see in the screenshot I send you the notifications appear like this and i can not find any solution. Could you help me? Thank you!!!

Screenshot

Crypthos commented 2 years ago

I had the same issue

` error NG1010: Value at position 0 in the NgModule.imports of NotifierModule is not a reference
Value could not be determined statically.

44 imports: [NotifierModule.withConfig(customNotifierOptions)],


  src/app/modules/notifier.module.ts:44:13
    44   imports: [NotifierModule.withConfig(customNotifierOptions)],
Unable to evaluate this expression statically.

src/app/modules/notifier.module.ts:44:13 44 imports: [NotifierModule.withConfig(customNotifierOptions)],


    Unable to evaluate an invalid expression.

Error: src/app/modules/notifier.module.ts:44:28 - error TS2339: Property 'withConfig' does not exist on type 'typeof NotifierModule'.

44   imports: [NotifierModule.withConfig(customNotifierOptions)],
`
sasikamm commented 1 year ago

you need to import the notifier style. https://github.com/dominique-mueller/angular-notifier#3-import-the-styles

put this import of your style.css/scss as follows @import "~angular-notifier/styles";