question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ngx-toastr doesn't work with Angular 8.0/8.1 with enabled Ivy

See original GitHub issue

Hello!

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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ErazerBrechtcommented, Jul 27, 2019

And with the new release of Angular 8.2 RC0 I can confirm that this problem is fixed.

0reactions
ErazerBrechtcommented, Jul 23, 2019

@scttcper This problem could be solved by changing the selector of the toast components to non bracket notation.

Aka [toast-component] to toast-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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ngx toastr not working when ivy is enabled in Angular 8
ngx toastr library does not work when ivy is enabled in Angular 8. It works when ivy is disabled in the tsconfig.app.json.
Read more >
How to implement toastr notifications in angular 8? - Therichpost
I am showing toastr notifications in Angular 8 button click event. We can use this in many ways. Here is the working picture...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found