Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Behavior of $location.path() inconsistent when back and forward buttons are used #4989

Closed
@wilsonjackson

Description

@wilsonjackson

Example plunk: http://plnkr.co/edit/DA3Oq6?p=preview

In a handler for the $locationChangeStart event, a call to $location.path() will normally return the URL being navigated to. But if you use the forward or back button (or use history.back() or history.forward()) it will return the URL being navigated from.

This isn't the case with the $locationChangeSuccess event, which behaves as expected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions