Skip to content

Using NavLink in a component #8

@alvarosaavedra

Description

@alvarosaavedra

Hi I'm trying to test a component that use inside a NavLink component (Just as de NavBar from the Sample app) fails to Instantiate all de dependencies.

At first was that the NavigationManager was not added as service, after I added it using a mock it failed at initialize:

var NavigationService = new Mock<NavigationManager>(); host.AddService(NavigationService.Object);

Error
Mensaje: System.InvalidOperationException : 'NavigationManagerProxy' has not been initialized. Seguimiento de la pila: NavigationManager.AssertInitialized() NavigationManager.add_LocationChanged(EventHandler`1 value) NavLink.OnInitialized()

Any help? or idea?

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