Last active
November 15, 2022 16:28
-
-
Save ezequieltejada/e17b9fdeb60bc11e5d00017ce5c28a44 to your computer and use it in GitHub Desktop.
How to handle multiple asynchronous inputs
This file contains 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
asyncInputsData$ = new BehaviorSubject(null); | |
/***** | |
* (13/11/2022) OLD... just use @Inputs | |
*****/ | |
ngOnChanges(changes: SimpleChanges): void { | |
const obj = {}; | |
Object.keys(changes).forEach(key => { | |
obj[key] = changes[key].currentValue; | |
}); | |
this.asyncInputsData$.next({...this.consumerAndBrandId$.value, ...obj}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe I should make an VSCode snippet