angular-cn/aio/content/examples/universal
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
..
e2e/src test(docs-infra): add tests for `universal` docs example (#36483) 2020-04-16 09:43:41 -07:00
src docs: remove unneeded code from `universal` example/guide (#36483) 2020-04-16 09:43:42 -07:00
example-config.json test(docs-infra): add tests for `universal` docs example (#36483) 2020-04-16 09:43:41 -07:00
server.ts refactor(docs-infra): update `universal` example to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
tsconfig.server.json docs: update universal docs for new ivy implementation (#33040) 2019-10-21 11:25:44 -04:00
zipper.json build(docs-infra): remove obsolete properties from `zipper.json` files (#36018) 2020-03-27 10:48:30 -07:00