Skip to content

What's the suggested way to connect to a parametrized Observable? #24

Answered by simplifiedcourses
riker09 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there!
I'd personally still use an observable for that.

const params$ = toObservable(this.selectMany('['paramA', 'paramB']))
const data$ = this params$.pipe(switchMap(params => yourCall(params))
this.connectObservables({
 data: data$
})

Does that make sense to you?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@riker09
Comment options

Answer selected by riker09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants