Conditional provider ? #1482
Unanswered
matanshukry
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have 2 providers:
AppState
, which can be inloading
,loaded
anderror
. When loaded, it has the url of the backend.UserService
, which usesAppState
to know to which url to send requests to.Currently what I had in mind:
The problem is with
state.currentConfigIfLoaded?.host
- which is a nullable string.userService
should not accept null host, since it can't do anything in that case.How would one solve it?
Beta Was this translation helpful? Give feedback.
All reactions