Am using ngx-toastr
lib for couple of notifications and different use cases. All works fine.
The only point am still struggling with, is a dynamic global configuration. I mean the one used in app.module.ts
:
imports: [
...
BrowserAnimationsModule,
ToastrModule.forRoot({
maxOpened: 1,
...
}),
....
]
I would like to pass the configuration object dynamically using a property in env file. I don't want to use any custom component for this such as:
imports: [
...
BrowserAnimationsModule,
ToastrModule.forRoot({
toastComponent: MyToastRCustomComponent
}),
....
]
I'm thinking about creating a service for this.. any other hint or idea which could be more suitable?