Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Is there a way to remove the '#' in routing #1910

Open
4 tasks done
DartViet opened this issue Sep 2, 2020 · 1 comment
Open
4 tasks done

Is there a way to remove the '#' in routing #1910

DartViet opened this issue Sep 2, 2020 · 1 comment

Comments

@DartViet
Copy link

DartViet commented Sep 2, 2020

I was following to tutorial, and recently I notice the '#' in url path (ex: localhost:4040/#/heroes ) cause quite a lot of troubles.

I'm working on authentication using Microsoft Azure. It asked for the return uri, and if I input the return uri with the '#', error message always pops up. (in my case: http://localhost:8080/#/msauth/ never works, but http://localhost:8080/ works normally.

I open postman, try to add key-value in parameter, and if there is a '#' symbol in the url... it does like this:

http://localhost:8080/?param1=value1&param2=value2#/heroes

The bottom line, I think the '#' is the problem, and it would be nice to get rid of it... I just don't know how.

In order to route, prioritize, and act on this as soon as possible please include:

  • Dart SDK Version (2.9.2)
  • AngularDart Version ( MASTER)
  • Whether you are using Windows
  • Whether you are using Chrome
@valakis
Copy link

valakis commented Sep 16, 2020

You have to provide the PathLocationStrategy instead of the HashLocationStrategy then it will serve without the #, but then you have to handle the non default routes by a server-

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

No branches or pull requests

2 participants