Skip to content

router-view not updating after v-if resolves to true #109

Closed
@rpkilby

Description

@rpkilby

If a router-view is wrapped inside of a v-if directive, it won't update once the v-if directive resolves to true. A couple of thoughts - It might make sense to warn the user when no router-view is present. Alternatively, the router-view could wait to transition until it detects a router-view has been inserted inside the router's root selector.

Notes:

  • Neither calling router.go() nor clicking on v-links to the route will update the router-view.
  • The router is not failing, as changing routes does update the router-view/component.
  • Only the component's canActivate hook was called.

Example fiddle: http://jsfiddle.net/xn7tmbdn/4/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions