Stabzs / Angular2-Toaster

Angular2-toaster is an asynchronous, non-blocking Angular Toaster Notification library
MIT License
334 stars 93 forks source link

How to add containerId in ToasterConfig? #217

Closed coderdipti closed 3 years ago

coderdipti commented 4 years ago

I want to update the containerId. How can I do that? In old version there was an option to change the container Id using config. https://www.npmjs.com/package/angular-toastr

coderdipti commented 4 years ago

My application is having mix of angularjs and angular8. Angularjs is removing the container id toast-container which is impacting the angular8 toaster messages. I want to change the ID of angular8 toaster container. Please suggest something on this

Stabzs commented 4 years ago

Currently the container always applies the id #toast-container, based on the original toastr implementation. Since the library supports multiple containers on a page, this is semantically incorrect. In version 11.0.0, this will be changed to use the class toast-container instead.

For your specific scenario, you might want to apply a class override to your container element and override the toaster.css to use your custom class. There isn't currently a way to pass an id to the container.

Stabzs commented 3 years ago

Closing due to lack of activity. If you need additional help or clarification, please feel free to reopen the issue.