Questions tagged [hash-location-strategy]

23 questions
0
votes
1 answer

Is there a way to tell if the RouterModule useHash in Angular 8 is set to true?

I'm working on a library for my job that allows other development teams to use some of our Angular components and pass in there own configurations. One of the is the is the RouterModule. I've found some code in our library where I need to determine…
0
votes
0 answers

Angular HashLocationStrategy removes last element from path after loading app

I'm trying to get Angular's HashLocationStrategy working together with generic base href (to deploy app under any path - pretty much solutions suggested here) My @NgModule: imports: [ RouterModule.forRoot([ { path: 'history', …
Matthew
  • 427
  • 3
  • 8
0
votes
1 answer

How can I setup HashLocationStrategy in latest Angular properly?

So I have a spa made in Angular. I made it for a friend so I only have acces to the ftp server and I can't configure it to work with the default Angular navigaton. During the project generation I 'ticked' the option for routing. I tried setting up…
0
votes
2 answers

Location Strategy while hosting on IIS server

I was running my application on local server, it was working fine, when we hosted it, it started working okay untill i refreshed the page and the 404 error occured. then i came up with the solution of using HashLocationStrategy. It worked very well.…
Hur Abbas
  • 115
  • 10
0
votes
1 answer

Angular build - Refresh goes to 404, Is there any way to resolve this without implementing the HashLocationStrategy

Angular build is hosted in the server and is working properly, except, on refreshing any of the page, it goes to web server 404 page. While searching for the solution, everybody suggests the HashLocationStrategy. Is there any other way to resolve…
Sanjay Kumar N S
  • 4,653
  • 4
  • 23
  • 38
0
votes
1 answer

Conditionally change angular location strategy

I’m trying to replace the location strategy by condition prod/dev console.log(IonicENV.mode) <= this loges true Then { provide: LocationStrategy, useClass: (IonicENV.mode == "prod") ? PathLocationStrateg HashLocationStrategy } Although…
-1
votes
1 answer

Hash (#) in URL - Angular

I have an Angular 14 application that uses HashLocationStrategy - # in URL (Example: https://localhost:4200/#/agenda?data=2023-03-22). Some of my customers have tried to post stories on Instagram, but Instagram "cuts" the URL from the hash (#),…
-1
votes
1 answer

Okta Redirect Url Not working when HashLocationStrategy is enabled in Angular

I am trying to add Okta SSO in my application. But because of HashLocationStrategy okta not able to parse token. Is there any way to turn off HashLocationStrategy for specific route?
Tushar
  • 1,948
  • 1
  • 13
  • 32
1
2