I am not getting hash in my angular app for local site.
my configurations are here.
app-routing-module.ts
app.module.ts
Now, if after this configurations, I think my site should take hash in url like
but it's not working.
can anyone help me with this?
In your app-routing-module.ts use
{ useHash: true}
You already exported RouterModule from app-routing-module.ts so you don't need to agian import in app.module.ts. So remove RouterModule and all related code from app.module.ts and just import app-routing-module.ts in app.module.ts.
Hope it will help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.