route hasing added..

This commit is contained in:
Dhanraj
2024-09-29 09:04:54 +05:30
parent 7d701d3747
commit 9712439261
2 changed files with 6 additions and 2 deletions

View File

@ -94,7 +94,7 @@ export const routes: Routes = [
];
@NgModule({
imports: [RouterModule.forRoot(routes,{ useHash: true)],
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}

View File

@ -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]
})