Skip to content

Defer ofHub Execution #23

@mccow002

Description

@mccow002

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions