Skip to content

Instantly share code, notes, and snippets.

@FunnyGhost
Created December 13, 2021 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FunnyGhost/787e6902590660e7ea38b2bb3892e7c6 to your computer and use it in GitHub Desktop.
Save FunnyGhost/787e6902590660e7ea38b2bb3892e7c6 to your computer and use it in GitHub Desktop.
Server implementation of the Language Service
@NgModule({
imports: [
// The AppServerModule should import your AppModule followed
// by the ServerModule from @angular/platform-server.
AppModule,
ServerModule,
ServerTransferStateModule,
NoopAnimationsModule
],
providers: [
...
{ provide: LanguageService, useClass: ServerLanguageService }
],
// Since the bootstrapped component is not inherited from your
// imported AppModule, it needs to be repeated here.
bootstrap: [AppComponent]
})
export class AppServerModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment