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
{{ message }}
This repository was archived by the owner on Apr 15, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: guides/angular.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ If you don't already have an Angular application, you can create one using the f
25
25
26
26
```bash
27
27
npm install -g @angular/cli
28
-
ng new my-xdn-angular-app
28
+
ng new my-{{ PRODUCT_NAME_LOWER }}-angular-app
29
29
```
30
30
31
31
You should now have a working starter app. Run `ng serve` to see the application running on `localhost:4200`.
@@ -68,7 +68,7 @@ This will automatically add all of the required dependencies and files to your p
68
68
- The `{{ PACKAGE_NAME }}/core` package
69
69
- The `{{ PACKAGE_NAME }}/angular` package
70
70
- The `{{ PACKAGE_NAME }}/cli` package
71
-
-`xdn.config.js`- Contains various configuration options for {{ PRODUCT_NAME }}.
71
+
-`{{ CONFIG_FILE }}`- Contains various configuration options for {{ PRODUCT_NAME }}.
72
72
-`routes.js` - A default routes file that sends all requests to the Angular Universal server. Update this file to add caching or proxy some URLs to a different origin.
This will remove the given query parameters from the URL before it is used in cache. On cache miss the transformed URL will be passed to your code with the original query strings available to your code in `x-xdn-original-qs` request header.
86
+
This will remove the given query parameters from the URL before it is used in cache. On cache miss the transformed URL will be passed to your code with the original query strings available to your code in `{{ HEADER_PREFIX }}original-qs` request header.
87
87
88
88
- Including other request parameters like cookies:
## How do I know if a response was served from the cache?
193
193
194
-
To know if a response is being cached, examine the `x-xdn-t` response header. There are two components that indicate caching status:
194
+
To know if a response is being cached, examine the `{{ HEADER_PREFIX }}t` response header. There are two components that indicate caching status:
195
195
196
196
-`oc` - The outer (level 1) cache
197
197
-`sc` - The shield (level 2) cache
@@ -204,11 +204,11 @@ You will see one of the following values for these components:
204
204
205
205
## Why is my response not being cached?
206
206
207
-
To understand why a response was not cached, examine the `x-xdn-caching-status` response header. It will have one of the following values:
207
+
To understand why a response was not cached, examine the `{{ HEADER_PREFIX }}caching-status` response header. It will have one of the following values:
208
208
209
209
### ok
210
210
211
-
The response was cached or served from the cache (see `x-xdn-t`).
211
+
The response was cached or served from the cache (see `{{ HEADER_PREFIX }}t`).
212
212
213
213
### disabled
214
214
@@ -338,16 +338,16 @@ This guide walks you through clearing the cache on your site at a scheduled day
338
338
339
339
Here is an example script you can add to your `package.json` to handle cache clearing for each environment. You can also configure scripts to clear by surrogate key, path, or group (As defined in {{ PRODUCT_NAME }} Console)
340
340
341
-
These scripts assume that you have created environments called "production", "staging", and "development and you have created a deploy key for your site and added it as a secret in your repo called "xdn_deploy_token".
341
+
These scripts assume that you have created environments called "production", "staging", and "development and you have created a deploy key for your site and added it as a secret in your repo called "{{ PRODUCT_NAME_LOWER }}\_deploy_token".
|`--skip-framework`| Alias: "-s". Skips the framework (Next.js, Vue, Angular, etc..) build and simply rebundles your router |
30
-
|`--disable-permanent-assets`| Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
31
-
|`--include-sources`| Includes all non-gitignored source files in the bundle uploaded to {{ PRODUCT_NAME }}. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/xdn_config#section_sources) config in xdn.config.js. |
|`--skip-framework`| Alias: "-s". Skips the framework (Next.js, Vue, Angular, etc..) build and simply rebundles your router |
30
+
|`--disable-permanent-assets`| Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
31
+
|`--include-sources`| Includes all non-gitignored source files in the bundle uploaded to {{ PRODUCT_NAME }}. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/{{ PRODUCT_NAME_LOWER }}\_config#section_sources) config in {{ CONFIG_FILE }}. |
|`--site`| The name of the site to deploy. By default the `name` field in `package.json` is used. |
97
-
|`--environment`| The environment to deploy to. By default the `default` environment is used. |
98
-
|`--branch`| The name of the source control branch. This is automatically set when using Git. |
99
-
|`--skip-build`| Skips the build step |
100
-
|`--token`| Authenticates using a deploy token rather than your user credentials. Use this option when deploying from CI. |
101
-
|`--commit-url`| The URL at which the commit can be viewed in your source control provided. If your package.json provides the repository attribute the commit URL will be derived automatically if you use GitHub, GitLab, or BitBucket. |
102
-
|`--include-sources`| Includes all non-gitignored source files in the bundle uploaded to {{ PRODUCT_NAME }}. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/xdn_config#section_sources) config in xdn.config.js. |
103
-
|`--disable-permanent-assets`| Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
|`--site`| The name of the site to deploy. By default the `name` field in `package.json` is used. |
97
+
|`--environment`| The environment to deploy to. By default the `default` environment is used. |
98
+
|`--branch`| The name of the source control branch. This is automatically set when using Git. |
99
+
|`--skip-build`| Skips the build step |
100
+
|`--token`| Authenticates using a deploy token rather than your user credentials. Use this option when deploying from CI. |
101
+
|`--commit-url`| The URL at which the commit can be viewed in your source control provided. If your package.json provides the repository attribute the commit URL will be derived automatically if you use GitHub, GitLab, or BitBucket. |
102
+
|`--include-sources`| Includes all non-gitignored source files in the bundle uploaded to {{ PRODUCT_NAME }}. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/{{ PRODUCT_NAME_LOWER }}\_config#section_sources) config in {{ CONFIG_FILE }}. |
103
+
|`--disable-permanent-assets`| Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
0 commit comments