When I recently updated my project from Angular 11 to 14, I encountered the following error when running "ng serve".
Error: src/app/app-routing.module.ts:107:7 - error TS2322: Type '"enabled"' is not assignable to type 'InitialNavigation | undefined'.
107 initialNavigation: 'enabled',
The relevant code segment in app-routing.module.ts is as follows.
@NgModule({
imports: [
RouterModule.forRoot(routes, {
initialNavigation: 'enabled',
}),
],
exports: [RouterModule],
})
The project functioned properly on Angular 11. How can I resolve this issue for Angular 14?