Last active
August 31, 2020 09:29
-
-
Save ZeevKatz/402658b6e4dd273c2341acc21fd8a17d to your computer and use it in GitHub Desktop.
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
@Rehooktive(Hook.OnChanges) | |
private readonly onChanges$: Observable<SimpleChanges>; | |
ngOnChanges({ events }: SimpleChanges) { | |
if (events) { | |
this.registerEvents(this.events) | |
.pipe(takeUntil(this.onChanges$)) | |
.subscribe(event => this.logEvent(event, this.properties)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment