Skip to content

Allow accessing history state from Route-objects #1535

Open
@amxmln

Description

While I was refactoring my code to remove artificial params in lieu of the 4.1.4 release to write my data to the history.state object, I noticed that I can pass a state property to $router.push() and was kind of surprised that I could not retrieve it with $route.state (like I can with queries or params) but had to access it using window.history.state.

Would it be possible to implement a state property containing only the passed state in the RouteLocationNormalizedLoaded interface?

That would make it a more intuitive replacement for the removed artificial params IMO.

Metadata

Assignees

No one assigned

    Labels

    discussionThis problem still needs more feedbackenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions