Abu bakkar
Abu bakkar

Reputation: 1

remove # from the end of http://localhost:4200

How to remove the # sign from the angular application i.e. http://localhost:4200/#/

it was in angular application. http://localhost:4200/#/

Upvotes: 0

Views: 262

Answers (1)

Matthieu Riegler
Matthieu Riegler

Reputation: 56011

Your app is using the HashLocationStrategy.

You probably have in your code base something like :

{provide: LocationStrategy, useClass: HashLocationStrategy}

which can be remove entirely as PathLocationStrategy is the default value

or

RouterModule.forRoot(routes, { useHash: true })

Then you just have to remove the useHash option.

Upvotes: 1

Related Questions