Skip to content

Commit

Permalink
Merge pull request #304 from NREL/issue-77
Browse files Browse the repository at this point in the history
update options to fix blank pages on refresh
  • Loading branch information
RLiNREL authored Nov 4, 2024
2 parents 83db6c3 + 665692a commit a7b1538
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
import { WelcomeComponent } from './core-components/welcome/welcome.component';
import { PageNotFoundComponent } from './core-components/page-not-found/page-not-found.component';
import { UserDashboardComponent } from './user-dashboard/user-dashboard.component';
Expand Down Expand Up @@ -281,8 +281,14 @@ const routes: Routes = [

];

const routerOptions: ExtraOptions = {
anchorScrolling: 'enabled',
scrollPositionRestoration: 'enabled',
useHash: true
}

@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forRoot(routes, routerOptions)],
exports: [RouterModule]
})
export class AppRoutingModule { }

0 comments on commit a7b1538

Please sign in to comment.