ngx-toastr
ngx-toastr copied to clipboard
Providing multiple classes in positionClass fails
This is the config i am working with
export const COMMON_TOAST_OVERRIDE: Partial<GlobalConfig> = {
positionClass: 'admin-container toast-bottom-right', // all toasts container
toastClass: 'admin-single-toastr-container', // single toast container
newestOnTop: false,
maxOpened: 3,
autoDismiss: true,
tapToDismiss: false,
timeOut: 3000,
extendedTimeOut: 3000
// disableTimeOut: 'extendedTimeOut'
};
But adding more than 1 class in positionClass field fails with the following error in console
ERROR DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided ('admin-container toast-bottom-right') contains HTML space characters, which are not valid in tokens.
at Overlay._createPaneElement (http://localhost:4200/vendor.js:71170:24)
at Overlay.getPaneElement (http://localhost:4200/vendor.js:71159:76)
at Overlay.create (http://localhost:4200/vendor.js:71152:44)
at ToastrService._buildNotification (http://localhost:4200/vendor.js:71437:41)
at ToastrService._preBuildNotification (http://localhost:4200/vendor.js:71410:21)
at ToastrService.show (http://localhost:4200/vendor.js:71312:21)
at http://localhost:4200/testmanagement-testManagement-module.js:135373:42
at SafeSubscriber._next (http://localhost:4200/main.js:16704:48)
at SafeSubscriber.__tryOrUnsub (http://localhost:4200/vendor.js:86042:16)
at SafeSubscriber.next (http://localhost:4200/vendor.js:85981:22)
at Subscriber._next (http://localhost:4200/vendor.js:85931:26)
at Subscriber.next (http://localhost:4200/vendor.js:85908:18)
at MapSubscriber._next (http://localhost:4200/vendor.js:90473:26)
at MapSubscriber.next (http://localhost:4200/vendor.js:85908:18)
at FilterSubscriber._next (http://localhost:4200/vendor.js:89986:30)
at FilterSubscriber.next (http://localhost:4200/vendor.js:85908:18)
at MergeMapSubscriber.notifyNext (http://localhost:4200/vendor.js:90709:26)
at SimpleInnerSubscriber._next (http://localhost:4200/vendor.js:86296:21)
at SimpleInnerSubscriber.next (http://localhost:4200/vendor.js:85908:18)
at XMLHttpRequest.onLoad (http://localhost:4200/vendor.js:13256:30)
at XMLHttpRequest.sentryWrapped (http://localhost:4200/assets/js/sentryConfigRec.js:369:23)
at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:521:35)
at Object.onInvokeTask (http://localhost:4200/vendor.js:41584:33)
at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:520:40)
at Zone.runTask (http://localhost:4200/polyfills.js:289:51)
at ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:602:38)
at invokeTask (http://localhost:4200/polyfills.js:1743:18)
at XMLHttpRequest.globalZoneAwareCallback (http://localhost:4200/polyfills.js:1780:25)
Is there any way i can add more than 1 class to the container of all toastrs?