angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

Automatic addition of / after # in URL breaks history

Open jswright opened this issue 14 years ago • 1 comments

If a link does not include the proper / (with html5Mode false), the location gets rewritten to include the /, but then the back button doesn't work.

Here it doesn't work: http://jsfiddle.net/h3NHF/2/

Here it does: http://jsfiddle.net/h3NHF/3/

If the links instead look like

<a ng-click="$location.path('Book/Foo')">Foo</a>

then everything works as expected - the problem only seems to be present when the location is parsed out of window.location itself.

jswright avatar Aug 02 '12 04:08 jswright

fixed in 1.2.0+ http://jsfiddle.net/s9m6p/

IgorMinar avatar Jan 05 '14 08:01 IgorMinar