Skip to content

Encoding url (Angular 1.6.0) #3203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RSamaium opened this issue Dec 15, 2016 · 4 comments
Closed

Encoding url (Angular 1.6.0) #3203

RSamaium opened this issue Dec 15, 2016 · 4 comments

Comments

@RSamaium
Copy link

With Angular 1.6.0 (only)

The path /#/login is transformed by #!#%2Flogin

@christopherthielen
Copy link
Contributor

can you show exactly what you mean in a plunker? http://bit.ly/UIR-Plunk

@niushapaks
Copy link

Same for us, roll backed to angular 1.5.8 and angular router to 0.3.1. What a waste of time... if only we had fixed our package.json dependencies versions...

@mbarakaja
Copy link

Anguar 1.6.0 is prefixing the URL hash part with a ! character. I not sure, but I guess, this is making a wrong URL encoding. The solution so far If you want to use [email protected] with [email protected] is removing the prefix in the config block with $locationProvider.

angular.module('app', ['ui.router'])
    .config(function($stateProvider, $locationProvider) {

      // remove ! hash prefix
      $locationProvider.hashPrefix('');

     // ui-router code ...
    });

This is working for me right now.

@christopherthielen
Copy link
Contributor

This is a breaking change introduced in Angular 1.6.0. See: https://docs.angularjs.org/guide/migration#migrating-from-1-5-to-1-6

Changing the default $location hash-prefix to '!', as the previous empty string default was unconventional and confusing.

Revert to previous behavior using the instructions provided by @mbarakaja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants