Skip to content

Issue when a query string is used on url without trailing slash #2550

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
cadilhac opened this issue Feb 12, 2016 · 3 comments
Closed

Issue when a query string is used on url without trailing slash #2550

cadilhac opened this issue Feb 12, 2016 · 3 comments

Comments

@cadilhac
Copy link

Using Angular 1.4 or 1.5 in an asp.net mvc site
I have a base tag:

<base href="/fr/">

and html5mode is set.

The site works perfectly. I use ui-router... no issues.
But today I hit one and this is when I try to browse to this kind of url:

http://example.com/fr?arg=1

I get an error from angular:

url is undefined
trimEmptyHash@http://............/angular.js?tag=2016020919:12165:3

If I navigate to /fr/?arg=1 (with the trailing slash) the error goes away.

In this context, is this a bug? How to get the query string to work without a trailing slash? "Normal" people typing a url normally will never put a slash before the question mark...

Note: I don't know if this is a ui-router or an angularjs issue. I checked this and tried the 2 mentioned solutions:

  • strictMode to false didn't change anything
  • even if I use the latest ui-router, I tried using a rule. A breakpoint inside the rule is not even reached and so the problem is still there.
@christopherthielen
Copy link
Contributor

In this context, is this a bug?

It's hard to tell.. I'll need more information. How can I reproduce this? Can you post a reproduction in a plunker?

@cadilhac
Copy link
Author

Seems I can't. Tell me if I'm wrong, but how can I create a plunkr to simulate what happens when a url is typed on the browser address bar?
That said, I now think the issue is more on the angularjs side.

@eddiemonge
Copy link
Contributor

Closing due to inactivity

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

3 participants