Open ekta-rupareliya opened 10 months ago
I had the same problem, however i could solve. You should import providers: [ provideAnimations(), provideToastr(), ] In app.config.ts, in the app.component.ts you don't import nothing Now in your component where you call the toast, you should continue work as the same
Even with @rickardaniel 's tip I still get "Type 'EnvironmentProviders' is not assignable to type 'Provider'." error. Anyone has any tips on how to fix this? Thank you.
I'm working with: Angular CLI : 17.0.8 Angular: 17.0.8 Node: 20.10.0 npm: 10.2.5 TypeScript: 5.2.2 ngx-toastr: ^17.0.2
You should add @import 'ngx-toastr/toastr'; in the file styles.scss, Also try to work the toast services in another file
if we install ngx-toaster and import in angular 17 then import in standalone component but not working
@Component({ selector: 'app-notification', standalone: true, imports: [PageTitleComponent, ToastrModule.forRoot()], templateUrl: './notification.component.html', styles: `` })