ViewDeestroyedError when click closing notification
See original GitHub issueHey, I’m getting this error when I click the notification for it to disappear.
Uncaught Error: ViewDestroyedError: Attempt to use a destroyed view: detectChanges
at viewDestroyedError (core.js:9800)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:14652)
at checkAndUpdateView (core.js:13802)
at callWithDebugContext (core.js:15056)
at Object.debugCheckAndUpdateView [as checkAndUpdateView] (core.js:14593)
at ViewRef_.detectChanges (core.js:11577)
at eval (angular2-notifications.umd.js:535) <----------- HERE
at ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:4749)
at ZoneDelegate.invoke (zone.js:387)
This is very bad for performance as this error hits 365 times in my app because it executes change detection though the entire component tree. This error is coming from Angular’s changed detection running right after it’s destroyed, looking for it. I’m not sure how to fix it though, or prevent it maybe in the source code for angular2-notifications
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ViewDestroyedError when click closing Angular2-notification ...
I'm getting this error when I click the notification for close.it seems to occur randomly. zone.js:196 Uncaught Error: ViewDestroyedError: ...
Read more >Angular - Testing - API Manual
This guide offers tips and techniques for unit and integration testing Angular applications. The guide presents tests of a sample application created with ......
Read more >ng2-completer | Yarn - Package Manager
If true will open and close the dropdown by click. boolean, No, false. selectOnFocus, If true will select the input text upon focus....
Read more >attempt to use a destroyed view: detectchanges - OSCHINA
after click', async(() => { builder.createAsync(HelloWorld).then((fixture: ComponentFixture<HelloWorld>) => { fixture.detectChanges(); let el = fixture.
Read more >View Raw - UNPKG
... **modal:** fix anchor for esc closing option demo ... **typeahead:** apply existing text on focus and click with typeaheadMinLength = 0 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes @davidalee you’re right as far as I can tell it isn’t connected. It looks like it errors out when the notification is manually destroyed at the same time as it’s being animated out.
I had the same issue today.