I went through a tutorial on implementing msal with Angular
https://learn.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-angular-auth-code
It seems like the issue lies in this part of the code
@NgModule({
imports: [RouterModule.forRoot(routes, {
initialNavigation: !isIframe ? 'enabled' : 'disabled'
})],
exports: [RouterModule]
})
When I run
npm start
An error message is displayed stating
TS2322: Type '"disabled" | "en abled"' is not assignable to type 'InitialNavigation | undefined'. Type '"enabled"' is not assignable to type 'InitialNavigation | undefined'.
Upon clicking on initialNavigation, the following explanation is provided
/**
* One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.
* When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root
* component is created. The bootstrap is blocked until the initial navigation is complete. This
* value is required for [server-side rendering](guide/universal) to work. When set to
* `enabledNonBlocking`, the initial navigation starts after the root component has been created.
* The bootstrap is not blocked on the completion of the initial navigation. When set to
* `disabled`, the initial navigation is not performed. The location listener is set up before the
* root component gets created. Use if there is a reason to have more control over when the router
* starts its initial navigation due to some complex initialization logic.
*/
initialNavigation?: InitialNavigation;