ui-router icon indicating copy to clipboard operation
ui-router copied to clipboard

Issue with #!/ url in enabled html5mode, it is changing URL to #!/%2F

Open andywunderlich opened this issue 9 years ago • 2 comments

This issue tracker is for Bug Reports and Feature Requests only. Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.

This is a:

  • [X ] Bug Report
  • [ ] Feature Request
  • [ ] General Query

My version of UI-Router is: 1.0.0-rc.1

Bug Report

Current Behavior:

I have the router configuration: $locationProvider.html5Mode(true).hashPrefix('!');

And i want to use Snipcart. By click on Add to cart, Snipcart is adding #!/cart to the url. Angular UI Router is changing the url to #!%2Fcart which issues that the cart is not displayed.

Example: http://localhost:333/product

By click to Add to cart the url is changing to http://localhost:333/product#!%2Fcart

Expected Behavior:

I expect that the url will be http://localhost:333/product#!/cart

With disabled Html5Mode it works correctly, but i don't want to need the # in every url. I also tried already a lot of different modes, like:

$locationProvider.html5Mode(false).hashPrefix(''); $locationProvider.html5Mode(true).hashPrefix(''); $urlMatcherFactoryProvider.strictMode(false);

I see no reason why angular ui router should change the / to %2F after the hashtag #!

Thanks, Andy

andywunderlich avatar Mar 09 '17 08:03 andywunderlich

Please provide a plunker reproduction. http://bit.ly/UIR-Plunk1

When you have provided a plunker, re-open this issue.

christopherthielen avatar Mar 25 '17 16:03 christopherthielen

@andywunderlich - how did you resolve this issue? I have exactly the same behaviour in an app that I am adding the cart to.

craig-doyle-uk avatar Jan 20 '18 13:01 craig-doyle-uk