angular-cn/aio/content
George Kalpakas 1e3b8a1354 docs: remove unneeded code from `universal` example/guide (#36483)
In the past, server-side rendered apps needed to convert URLs used in
API requests to absolute when rendering on the server. Originally, this
was handled in the `universal` guide and corresponding example app by
modifying the `HeroService` to use `APP_BASE_HREF` to derive the
absolute URL.

In #28956, the guide was updated to show an improved method: Specifying
an `HttpInterceptor` that took care of converting the URLs to absolute.
That interceptor was only provided when rendering the app on the server.
By mistake, the corresponding example app was not updated along with the
guide.

Since `@nguniversal/*` v7.1.0, it is no longer necessary to convert the
URLs to absolute inside the app. This is handled in the `@nguniversal`
libs (see angular/universal#897).

This commit updates the example app to remove unnecessary code and
modifies the guide to mention the issue with absolute URLs, but explain
that developers only need to worry about it when not using one of the
`@nguniversal/*-engine` packages.

PR Close #36483
2020-04-16 09:43:42 -07:00
..
cli refactor(docs-infra): remove obsolete `format` attribute from code examples (#31674) 2019-07-24 14:38:54 -07:00
cli-src build(docs-infra): make the git ref for cli command docs configurable (#26391) 2018-10-11 12:57:49 -07:00
examples docs: remove unneeded code from `universal` example/guide (#36483) 2020-04-16 09:43:42 -07:00
guide docs: remove unneeded code from `universal` example/guide (#36483) 2020-04-16 09:43:42 -07:00
images docs: adding Doguhan Uluca as GDE resource (#34789) 2020-04-03 14:03:57 -07:00
marketing docs: move ng-conf 2020 to the already presented section (#36413) 2020-04-13 08:20:03 -07:00
start fix(docs-infra): remove `routerLink` from `top-bar` (#35951) 2020-03-13 08:25:39 -07:00
tutorial docs: remove service from region where it was added before it was created (#35354) 2020-02-12 16:46:22 -08:00
file-not-found.md fix(docs-infra): do not create an anchor for the `file-not-found` header (#27250) 2018-12-05 13:26:26 -08:00
license.md build: bump year (#34651) 2020-01-13 07:21:43 -08:00
navigation.json docs: update and edit web-worker page (#36026) 2020-04-01 13:17:26 -07:00