Skip to content

Blazor WASM custom component in SPA app timing issue #62276

@ZeroZeroOne-dev

Description

@ZeroZeroOne-dev

I'm trying to use a Blazor custom component (as WASM) in my angular application.

I'm currently running into an issue where my attribute and event bindings on the custom component don't work.
I think its a timing issue, when I put the binging in a timeout of 1 second they work fine. It seems to me that its an issue where my bindings will happen before blazor is properly started.

I have set up an example repo where the issue is demonstrated: https://github.com/ZeroZeroOne-dev/BlrInAng

In the angular code you can enable the code with the timeout to see when it does and doesn't work.

Is there a proper way to ensure that blazor is attached to my component before my bindings are set by angular?
The documentation is pretty lacking when it comes to usage of the components outside of a blazor environment.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions