Last active
March 25, 2020 19:58
-
-
Save juanmendes/430834f10a99bf4ef8a4f841dd1e0f25 to your computer and use it in GitHub Desktop.
A component that uses the SubscriptionTrackerMixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({}) | |
class NonLeakyComponent extends SubscriptionTrackerMixin(Object) implements OnDestroy { | |
ngOnInit() { | |
const myTimer = timer(1,1); | |
this.subscribe(myTimer, () => console.log("timer called")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment