Drop UntilDestroy decorator
See original GitHub issueIn the latest Angular version, we can achieve the same functionality by using only the untilDestroy
operator. We’ll drop support for Pipes for now.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Developers - Drop UntilDestroy decorator - - Bountysource
Drop UntilDestroy decorator ... In the latest Angular version, we can achieve the same functionality by using only the untilDestroy operator. We'll drop...
Read more >@ngneat/until-destroy | Yarn - Package Manager
The order of decorators is important, make sure to put @UntilDestroy() before the @Component() decorator. When using overrideComponent in unit tests remember ...
Read more >Auto-Unsubscribing in Angular Components Like a Pro
This solution incorporates the principles similar to the ones of the @AutoUnsubscribe decorator, along with a new feature — the untilDestroyed ...
Read more >How to add a method on ngOnDestroy in angular decorator ...
I have already tried to add a ngOnDestroy on my code in decorator but it overrides the classes ngOnDestroy. constructor.prototype.
Read more >Angular Take Until Destroy Decorator - StackBlitz
take-until-destroy.decorator';. import { Observable, interval } from 'rxjs';. import { takeUntil } from 'rxjs/operators';. @Component({. selector: 'hello',.
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 Free
Top 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
@VamsiDharmaji, @NetanelBasal I can confirm the above code does not seem to work. It runs the
componentInstance[destroyMethodName] = function ()
assignment but the method is never called. According to the PR https://github.com/angular/angular/pull/35464 you can modify the lifecycle hooks any time before initialization but nothing after the initialization is certain to run.The decorator can probably be cleaned up a little and maybe some changes can be done to make it easier to share the attribute from a base class but I think this issue should probably be wontfixed sadly.
I’m closing the issue for now.