You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-2Lines changed: 63 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -76,10 +76,71 @@ To test this in local development, run your Angular project using `netlify serve
76
76
```sh
77
77
netlify serve
78
78
```
79
+
### App Engine Developer Preview usage with Angular@19
79
80
80
-
## Limitations
81
+
If you opt into the App Engine Developer Preview accessing `Request` and `Context` objects is streamlined. Instead of custom Netlify prefixed providers, you should use the standardized injection tokens for those provided by `@angular/ssr` instead:
81
82
82
-
- The [`server.ts` file](https://angular.dev/guide/ssr#configure-server-side-rendering) that's part of the Angular scaffolding is meant for deploying to a VM, and is not compatible with this Netlify build plugin. If you applied changes to that file, you'll need to replicate them in an Edge Function. See (#135)[https://github.com/netlify/angular-runtime/issues/135] for an example.
83
+
```diff
84
+
+import { REQUEST, REQUEST_CONTEXT } from '@angular/ssr/tokens'
85
+
import type { Context } from "@netlify/edge-functions"
console.log(`Rendering Foo for path ${request?.url} from location ${context?.geo?.city}`)
97
+
// ...
98
+
}
99
+
100
+
}
101
+
```
102
+
103
+
## Customizing request handling
104
+
105
+
Starting with Angular@19. The build plugin makes use of `server.ts` file to handle requests. The default Angular scaffolding does generate incompatible code for Netlify so build plugin will generate a compatible `server.ts` file for you automatically. If you need to customize the request handling, you can do so by starting with copying one of code snippets below to your `server.ts` file.
106
+
107
+
If you did not opt into the App Engine Developer Preview:
The [`server.ts` file](https://angular.dev/guide/ssr#configure-server-side-rendering) that's part of the Angular scaffolding is meant for deploying to a VM, and is not compatible with this Netlify build plugin for Angular@17 and Angular@18. If you applied changes to that file, you'll need to replicate them in an Edge Function. See (#135)[https://github.com/netlify/angular-runtime/issues/135] for an example.
0 commit comments