Skip to content

Commit

Permalink
feat: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lennybakkalian committed Nov 23, 2024
1 parent 6611725 commit e6b687b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export class DemoComponent {
}
```

## Known Issues
* **Headers are not forwarded when performing requests in ssr.**

_Add this provider to your `app.config.server.ts` file to fix this issue:_
```typescript
provideServerRoutesConfig([{path: '**', renderMode: RenderMode.Server}])
```

## TODOs 📝

- [ ] Additional Unit Tests for SSR and WebSocket Subscriptions.
Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
],
"scripts": [],
"server": "projects/example/src/main.server.ts",
"outputMode": "server",
"externalDependencies": [""],
"ssr": {
"entry": "projects/example/src/server.ts"
}
Expand Down
6 changes: 5 additions & 1 deletion projects/example/src/app/app.config.server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {ApplicationConfig, mergeApplicationConfig} from '@angular/core';
import {provideServerRendering} from '@angular/platform-server';
import {appConfig} from './app.config';
import {provideServerRoutesConfig, RenderMode} from '@angular/ssr';

const serverConfig: ApplicationConfig = {
providers: [provideServerRendering()]
providers: [
provideServerRendering(),
provideServerRoutesConfig([{path: '**', renderMode: RenderMode.Server}])
]
};

export const config = mergeApplicationConfig(appConfig, serverConfig);

0 comments on commit e6b687b

Please sign in to comment.