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
@@ -26,18 +27,19 @@ This build plugin implements Angular Support on Netlify.
26
27
27
28
## Installation and Configuration
28
29
29
-
Netlify automatically detects Angular projects and sets up the latest version of this plugin. There's no further configuration needed from Netlify users.
30
+
Netlify automatically detects Angular projects and sets up the latest version of this plugin.
30
31
31
-
### Manual Installation
32
+
### For Angular 17 and Angular 18
32
33
33
-
If you need to pin down this plugin to a fixed version, install it manually.
34
+
There's no further configuration needed from Netlify users.
34
35
35
-
Create a `netlify.toml` in the root of your project. Your file should include the plugins section below:
36
+
### For Angular 19
36
37
37
-
```toml
38
-
[[plugins]]
39
-
package = "@netlify/angular-runtime"
40
-
```
38
+
If you are using Server-Side Rendering you will need to install Angular Runtime in your Angular project to be able to import required utilities to successfully deploy request handler to Netlify. See [Manual Installation](#manual-installation) for installations details. See [Request handling](#request-handling) for more information about request handler.
39
+
40
+
### Manual Installation
41
+
42
+
If you need to pin this plugin to a specific version or if you are using Server-Side Rendering with Angular 19, you will need to install the plugin manually.
Read more about [file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation)
51
-
in our docs.
52
-
53
52
## Accessing `Request` and `Context` during Server-Side Rendering
54
53
55
54
During server-side rendering (SSR), you can access the incoming `Request` object and the Netlify-specific `Context` object via providers:
@@ -102,9 +101,15 @@ export class FooComponent {
102
101
}
103
102
```
104
103
105
-
## Customizing request handling
104
+
## Request handling
106
105
107
-
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 swap it for compatible `server.ts` file for you automatically if it detects default one being used. If you need to customize the request handling, you can do so by copying one of code snippets below to your `server.ts` file.
106
+
Starting with Angular@19. The build plugin makes use of the `server.ts` file to handle requests. The default Angular scaffolding generates incompatible code for Netlify so the build plugin will swap it for compatible `server.ts` file automatically if it detects default version being used.
107
+
108
+
Make sure you have `@netlify/angular-runtime` version 2.2.0 or later installed in your project. Netlify compatible `server.ts` file imports utilities from this package and Angular Compiler need to be able to resolve it and it can only do that if it's installed in your project and not when it's auto-installed by Netlify.
109
+
110
+
### Customizing request handling
111
+
112
+
If you need to customize the request handling, you can do so by copying one of code snippets below to your `server.ts` file.
108
113
109
114
If you did not opt into the App Engine Developer Preview:
110
115
@@ -115,6 +120,13 @@ import { render } from '@netlify/angular-runtime/common-engine'
0 commit comments