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: aio/content/guide/universal.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,13 +275,13 @@ In a server-side rendered app, HTTP URLs must be _absolute_ (for example, `https
275
275
This means that the URLs must be somehow converted to absolute when running on the server and be left relative when running in the browser.
276
276
277
277
If you are using one of the `@nguniversal/*-engine` packages (such as `@nguniversal/express-engine`), this is taken care for you automatically.
278
-
So, you don't need to do anything to make relative URLs work on the server.
278
+
You don't need to do anything to make relative URLs work on the server.
279
279
280
280
If, for some reason, you are not using an `@nguniversal/*-engine` package, you may need to handle it yourself.
281
281
282
-
There are several ways to achieve that.
283
-
The recommended solution, which is also the least intrusive as it does not require any changes to the app, is to pass the full request URL to the `options` argument of [renderModule()](api/platform-server/renderModule) or [renderModuleFactory()](api/platform-server/renderModuleFactory) (depending on what you use to render `AppServerModule` on the server).
282
+
The recommended solution is to pass the full request URL to the `options` argument of [renderModule()](api/platform-server/renderModule) or [renderModuleFactory()](api/platform-server/renderModuleFactory) (depending on what you use to render `AppServerModule` on the server).
283
+
This option is the least intrusive as it does not require any changes to the app.
284
284
Here, "request URL" refers to the URL of the request as a response to which the app is being rendered on the server.
285
285
For example, if the client requested `https://my-server.com/dashboard` and you are rendering the app on the server to respond to that request, `options.url` should be set to `https://my-server.com/dashboard`.
286
286
287
-
Now, on every HTTP request made as part of rendering the app on the server, Angular will be able to correctly resolve the request URL to an absolute URL, using the provided `options.url`.
287
+
Now, on every HTTP request made as part of rendering the app on the server, Angular can correctly resolve the request URL to an absolute URL, using the provided `options.url`.
0 commit comments