Skip to content

[2.0] redirect() not changing hash / abort() equivalent #692

Closed
@fergaldoyle

Description

@fergaldoyle

Example: http://run.plnkr.co/O8drrKqdru329Cf4/#/a
Source: http://plnkr.co/edit/fjHGwqUnUTzq2eDpKVTa?p=preview
Standalone source in case plunker is down: http://pastebin.com/bN2vMGY4

Steps in the above example:

  • Click "Go to B"
  • Click "OK" in the prompt
  • Press back button in the browser
  • Press forward button in the browser
  • Click "Cancel" in the prompt

Result:

  • Component A is correctly shown in the router outlet
  • Page hash is incorrect, still shows #/b

In the previous version of vue-router, using abort() would revert the hash back to the correct path.

On a site note, how do we handle the removal of abort()? redirect() needs you to know the previous path, where as abort() automatically reverted back to the previous path.

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