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.

Back button broken in Chrome when setting location.href in HTML5 mode #11667

Closed
@circlingthesun

Description

@circlingthesun

When clicking a link from http://example.com/ to http://example.com/app where /app runs angular with HTML5 mode and the baseURL set to /app, the following error is raised when you press the back button:

Error: [$location:ipthprfx] Invalid url "http://example.com/", missing path prefix "http://example.com/app/"

The offending line:
var pathUrl = beginsWith(appBaseNoFile, url);

Can be found here:

var pathUrl = beginsWith(appBaseNoFile, url);

pathUrl returns undefined which results in an error being thrown and the page not navigating back to http://example.com/ as expected.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions