How can I remain in the same page after refresh in Angular 15?

186 views Asked by At

Working with Angular15 I want to remain in the same page after hard refresh in the browser

I have APP_BASE_HREF config in app.module.ts

I have an routing url For eg: localhost:4200/app/page1 - Here app is baseHref This is working when I refresh

For eg: localhost:4200/app/page2/:paramter - Here app is baseHref This is always navigating to the previous page

I tried with {provide: LocationStrategy: useClass: PathLocationStrategy} but still same issue

How can i fix this?

0

There are 0 answers