Skip to content
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

How to remove # from url #37

Closed
xidedix opened this issue Dec 19, 2018 · 2 comments
Closed

How to remove # from url #37

xidedix opened this issue Dec 19, 2018 · 2 comments

Comments

@xidedix
Copy link
Member

xidedix commented Dec 19, 2018

I just bought and experience the same.
I am trying coreui-pro-angular-admin-template-2.2.0
Any idea to remove # ?
Thanks

Originally posted by @sasaahlan in coreui/coreui-react#46 (comment)

@xidedix xidedix transferred this issue from coreui/coreui-react Dec 19, 2018
@xidedix
Copy link
Member Author

xidedix commented Dec 19, 2018

Hi @sasaahlan

Changes have to be made in ./src/app/app.module.ts
You need to:

  • import PathLocationStrategy instead of HashLocationStrategy
  • and useClass: PathLocationStrategy in module providers

last but not least:

  • in src/index.html change <base href="./"> to <base href="/">

see also: https://angular.io/guide/router#appendix-locationstrategy-and-browser-url-styles

@xidedix
Copy link
Member Author

xidedix commented Dec 19, 2018

@xidedix xidedix closed this as completed Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant