0

I have been search for days for an answer to this but documentation is very limited. I want to be able to type a url for my app without using the # symbol. can anyone provide an example of this? thank you.

1 Answers1

0

To enable routes with #, add this to Angular app-level providers

Provider<LocationStrategy>(
    LocationStrategy,
    useClass: HashLocationStrategy)

without # is the default anyway.
The server needs to support HTML5 PushState for that to work.

See also PathLocationStrategy vs HashLocationStrategy in web apps

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567