Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer ofHub Execution #23

Open
mccow002 opened this issue Feb 17, 2021 · 0 comments
Open

Defer ofHub Execution #23

mccow002 opened this issue Feb 17, 2021 · 0 comments

Comments

@mccow002
Copy link

We are using APP_INITIALIZER to load in our config settings. This means that we will not know the base url of our hub until APP_INITIALIZER completes. However, ofHub gets evaluated immediately, causing the following error:
ReferenceError: Attempting to access configuration before it is set.

If the signature of ofHub was changed or overloaded to allow something like this:

ofHub(() => { hubName: 'myHub', url: `${this.configService.baseUrl}/hub` })

I think this would solve any issues caused by having to wait on the APP_INITIALIZER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant