Skip to content

Router event when navigating back in history #436

@powerbuoy

Description

@powerbuoy

I'm trying to determine whether the new route was processed because the user clicked the back button (or router.navigateBack() or similar was called) or if it was a "normal" click.

I've studied the router object itself, as well as the argument passed to the EventAggregator callback on the router:navigation:processing event but there doesn't seem to be any property indicating whether the back button was used or the route was initiated normally.

The reason I'd like to know this is so that I can animate my page transitions differently depending on whether the user is backing or going forward (they all sort of go forward now which looks odd when you actually hit the back button).

I've tried to store the history myself but it just feels wrong. Surely there's a better way to know than to re-create the entire browser history locally?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions