In Angular 16, withServerTransition
is deprecated. How can I replace it?
I tried the following code:
imports: [
BrowserModule,
{ provide: APP_ID, useValue: 'serverApp' },
...
],
But I'm getting the following error:
Type '{ provide: InjectionToken<string>; useValue: string; }' is not assignable to type 'any[] | Type<any> | ModuleWithProviders<{}>'.
Object literal may only specify known properties, and 'provide' does not exist in type 'any[] | Type<any> | ModuleWithProviders<{}>'.ts(2322)
(property) provide: InjectionToken<string>