From 971243926143219078988650fc128bfcc9e1ec1a Mon Sep 17 00:00:00 2001 From: Dhanraj Date: Sun, 29 Sep 2024 09:04:54 +0530 Subject: [PATCH] route hasing added.. --- support-portal-frontend/src/app/app-routing.module.ts | 2 +- support-portal-frontend/src/app/app.module.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/support-portal-frontend/src/app/app-routing.module.ts b/support-portal-frontend/src/app/app-routing.module.ts index d305d6e..4a3e5f9 100644 --- a/support-portal-frontend/src/app/app-routing.module.ts +++ b/support-portal-frontend/src/app/app-routing.module.ts @@ -94,7 +94,7 @@ export const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forRoot(routes,{ useHash: true)], + imports: [RouterModule.forRoot(routes)], exports: [RouterModule], }) export class AppRoutingModule {} diff --git a/support-portal-frontend/src/app/app.module.ts b/support-portal-frontend/src/app/app.module.ts index d397016..b0fdc76 100644 --- a/support-portal-frontend/src/app/app.module.ts +++ b/support-portal-frontend/src/app/app.module.ts @@ -1,5 +1,7 @@ import {Compiler, NgModule} from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; +import { HashLocationStrategy, LocationStrategy } from '@angular/common'; + import {AppComponent} from './app.component'; import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http"; @@ -68,7 +70,9 @@ import { EventFormComponent } from './component/event-form/event-form.component' ], // providers:[], providers: [Compiler,AuthenticationGuard, AuthenticationService, UserService,BlogService, - {provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true} + {provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true}, + {provide: LocationStrategy, useClass: HashLocationStrategy} + ], bootstrap: [AppComponent] })