ngx-toastr doesn't work with Angular 8.0/8.1 with enabled Ivy
See original GitHub issueHello!
I have an error when I use Angular 8.0/8.1 with enabled Ivy. Toastr worked when I disabled Ivy, but I don’t want to disable Ivy. Can somebody help my with this problem?
ERROR DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name. at DefaultDomRenderer2.createElement (http://localhost:4200/vendor.js:82322:25) at elementCreate (http://localhost:4200/vendor.js:53703:32) at ComponentFactory$1.create (http://localhost:4200/vendor.js:67815:13) at DomPortalHost.attachComponentPortal (http://localhost:4200/vendor.js:94547:41) at DomPortalHost.attach (http://localhost:4200/vendor.js:94505:21) at OverlayRef.attach (http://localhost:4200/vendor.js:94629:33) at ToastrService._buildNotification (http://localhost:4200/vendor.js:94955:35) at ToastrService._preBuildNotification (http://localhost:4200/vendor.js:94921:21) at ToastrService.success (http://localhost:4200/vendor.js:94828:21) at LoginComponent.showSuccess (http://localhost:4200/pages-login-login-routing-module.js:8466:21)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top GitHub Comments
And with the new release of Angular 8.2 RC0 I can confirm that this problem is fixed.
@scttcper This problem could be solved by changing the selector of the toast components to non bracket notation.
Aka
[toast-component]
totoast-component
Is there actually a reason why you preferred attribute notation? I already filed an issue to the Angular repo so they can fix it or at least mark it as ‘breaking change’ when enabling Ivy.