angular-cn/aio/content/guide
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
..
accessibility.md docs: port accessibility app from stackblitz to aio (#32377) 2019-09-10 13:11:48 -04:00
ajs-quick-reference.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
angular-compiler-options.md docs: changes AoT to AOT for consistency (#35112) 2020-02-04 10:43:33 -08:00
animations.md feat(docs-infra): simplify image styles and remove figure references (#33748) 2019-11-14 09:27:02 -08:00
aot-compiler.md docs: Fix minor typos and coding styles (#35325) 2020-02-13 13:31:30 -08:00
aot-metadata-errors.md docs: changes AoT to AOT for consistency (#35112) 2020-02-04 10:43:33 -08:00
app-shell.md docs: update universal docs for new ivy implementation (#33040) 2019-10-21 11:25:44 -04:00
architecture-components.md docs: make page titles and toc task-oriented (#36024) 2020-04-01 13:16:48 -07:00
architecture-modules.md feat(docs-infra): simplify image styles and remove figure references (#33748) 2019-11-14 09:27:02 -08:00
architecture-next-steps.md docs: fix broken guide link (tutorial/index --> tutorial) (#36453) 2020-04-06 13:56:00 -07:00
architecture-services.md feat(docs-infra): simplify image styles and remove figure references (#33748) 2019-11-14 09:27:02 -08:00
architecture.md docs: add " in architecture page (#36564) 2020-04-16 09:41:32 -07:00
attribute-directives.md docs: change p to pointer for better understanding (#34927) 2020-01-28 13:04:25 -08:00
bazel.md build: depend on bazelisk rather than directly on Bazel (#36078) 2020-03-16 10:58:06 -07:00
bootstrapping.md docs: change page title and minor edit (#36021) 2020-04-01 13:16:18 -07:00
browser-support.md docs: drop support for Android Marshmallow and older Android versions (#34540) 2020-01-27 10:46:26 -08:00
build.md docs: Fix links to Webpack docs (#34326) 2019-12-10 09:18:17 -08:00
cheatsheet.md docs: clarify meaning of injectable decorator (#31573) 2019-07-16 23:57:50 -04:00
cli-builder.md docs: add link to publish a library in ivy guide (#34986) 2020-01-27 10:50:52 -08:00
comparing-observables.md fix(docs-infra): convert hard-coded `comparing-observables` examples into a proper mini-app (#34327) 2020-01-21 13:14:46 -05:00
complex-animation-sequences.md docs: remove redundant whitespaces and fix minor typos (#33422) 2019-10-29 11:39:17 -07:00
component-interaction.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
component-styles.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
creating-libraries.md docs: move asset management section (#35665) 2020-03-18 15:55:44 -07:00
dependency-injection-in-action.md docs(core): fix typo in dependency injection guide (interactive --> interacting) (#34853) 2020-01-21 13:03:04 -05:00
dependency-injection-navtree.md docs: fix typo in Dependency Injection guide (#36304) 2020-03-30 11:14:55 -07:00
dependency-injection-providers.md docs(core): add missing quote in dependency injection provider guide (#34854) 2020-01-21 13:02:29 -05:00
dependency-injection.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
deployment.md docs: add amazon s3 builder package (#34783) 2020-02-24 09:13:58 -08:00
deprecations.md docs: update reactive forms page (#35969) 2020-04-07 15:24:17 -07:00
displaying-data.md docs: Change important alert of ngFor (#36176) 2020-03-23 11:36:09 -07:00
docs-style-guide.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
dynamic-component-loader.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
dynamic-form.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
elements.md docs: place download section to the top of the page (#36067) 2020-04-03 11:00:26 -07:00
entry-components.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
feature-modules.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
file-structure.md docs: replace `browserslist` with `.browserslistrc` (#36504) 2020-04-08 12:12:03 -07:00
form-validation.md docs: place download section in angular forms validation to the top of the page (#36074) 2020-04-03 11:03:36 -07:00
forms-overview.md feat(docs-infra): simplify image styles and remove figure references (#33748) 2019-11-14 09:27:02 -08:00
forms.md docs: place download section in angular forms to the top (#36075) 2020-04-03 11:05:31 -07:00
frequent-ngmodules.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
glossary.md docs: update glossary defs for components, templates, and views (#35559) 2020-03-27 10:46:49 -07:00
hierarchical-dependency-injection.md fix(docs-infra): fix parameters with @Optional() decorator do not match declared, optional type (#35150) 2020-02-07 09:58:31 -08:00
http.md docs: make page titles and toc task-oriented (#36024) 2020-04-01 13:16:48 -07:00
i18n.md docs: Ivy i18n guide updates for localize option (#34053) 2019-12-03 10:14:15 -08:00
ivy-compatibility-examples.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
ivy-compatibility.md docs: adding a note on extra text interpolations and HTML tags in translations to Ivy guide (#36029) 2020-03-18 10:00:59 -07:00
ivy.md docs: remove speeding update ngcc section (#36049) 2020-03-13 07:58:14 -07:00
language-service.md feat(docs-infra): simplify image styles and remove figure references (#33748) 2019-11-14 09:27:02 -08:00
lazy-loading-ngmodules.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
libraries.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
lifecycle-hooks.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
migration-dynamic-flag.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-injectable.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-localize.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-module-with-providers.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
migration-renderer.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-undecorated-classes.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
module-types.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
ngmodule-api.md docs: remove prerequisite section in NgModules docs (#31169) 2019-07-17 13:26:00 -04:00
ngmodule-faq.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
ngmodule-vs-jsmodule.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
ngmodules.md refactor(docs-infra): remove `linenums=false` since it is now the default (#31674) 2019-07-24 14:38:54 -07:00
npm-packages.md build(docs-infra): update docs examples `package.json` templates wrt `core-js` (#36143) 2020-04-06 15:31:07 -07:00
observables-in-angular.md docs: fix typo in Observables in Angular guide (#33509) 2019-10-31 22:21:00 +00:00
observables.md docs: clarify observables doc with new titles and tooltips (#36023) 2020-03-27 10:49:03 -07:00
pipes.md docs: place download section in angular pipes to the top (#36073) 2020-04-03 11:01:08 -07:00
practical-observable-usage.md fix(docs-infra): rename "title" by "header" to avoid unwanted tooltips (#26396) 2018-10-17 11:05:29 -07:00
providers.md docs: make page titles and toc task-oriented (#36024) 2020-04-01 13:16:48 -07:00
reactive-forms.md docs: update reactive forms page (#35969) 2020-04-07 15:24:17 -07:00
releases.md docs: update the Support policy and schedule (#35390) 2020-04-08 12:12:32 -07:00
reusable-animations.md docs: remove redundant whitespaces and fix minor typos (#33422) 2019-10-29 11:39:17 -07:00
route-animations.md docs: Clarifies code section is a continuation from the section above (#35111) 2020-02-06 15:31:41 -08:00
router.md docs: make page titles and toc task-oriented (#36024) 2020-04-01 13:16:48 -07:00
rx-library.md docs: update rxjs refs (#31780) 2019-08-08 12:15:29 -07:00
schematics-authoring.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
schematics-for-libraries.md docs: fix typo in Schematics guide (#36328) 2020-03-30 15:32:05 -07:00
schematics.md docs: make page titles and toc task-oriented (#36024) 2020-04-01 13:16:48 -07:00
security.md docs: add CSRF to XSRF section of http guide (#32933) 2019-11-21 16:57:12 -05:00
service-worker-communications.md refactor(docs-infra): remove `linenums=false` since it is now the default (#31674) 2019-07-24 14:38:54 -07:00
service-worker-config.md docs(service-worker): fix paths for `ngsw-config` command to match latest CLI (#34215) 2019-12-03 10:42:07 -08:00
service-worker-devops.md docs: clarrify use of sw behind redirect (#32915) 2019-10-21 16:50:52 -04:00
service-worker-getting-started.md feat(docs-infra): simplify image styles and remove figure references (#33748) 2019-11-14 09:27:02 -08:00
service-worker-intro.md docs: reference articles specifically (#32221) 2019-08-26 15:03:04 -07:00
set-document-title.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
setup-local.md docs: edit to setup-local (#36168) 2020-04-13 17:33:35 -07:00
sharing-ngmodules.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
singleton-services.md docs: reword explanation for using singleton services decorative to be more understandable (#35002) 2020-03-02 09:30:54 -08:00
static-query-migration.md build: bump year (#34651) 2020-01-13 07:21:43 -08:00
structural-directives.md docs: missing item variable in structural directives example (#35213) 2020-02-07 11:32:37 -08:00
styleguide.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
template-syntax.md fix(docs-infra): change `app-list-item` to `app-item-list` (#35601) 2020-03-23 11:40:15 -07:00
template-typecheck.md fix(ivy): add strictLiteralTypes to align Ivy + VE checking of literals (#35462) 2020-02-21 12:36:11 -08:00
testing.md docs: fix typo in Tests guide (#36592) 2020-04-13 08:17:27 -07:00
transition-and-triggers.md docs: fix animations example/remove 1st person (#35046) 2020-02-04 08:58:04 -08:00
typescript-configuration.md docs: add strictTemplates in place of fullTemplateTypeCheck (#35628) 2020-03-30 10:57:15 -07:00
universal.md docs: remove unneeded code from `universal` example/guide (#36483) 2020-04-16 09:43:42 -07:00
updating-to-version-9.md docs: Minor updates to Updating to Angular version 9 topic (#35135) 2020-02-07 09:57:56 -08:00
updating.md docs: remove the release schedule from docs (#34474) 2020-02-06 14:29:21 -08:00
upgrade-performance.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
upgrade-setup.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
upgrade.md docs(upgrade): remove outdated/non-applicable AOT section from upgrade guide (#36015) 2020-03-18 10:00:02 -07:00
user-input.md feat: add a temp solution to support passive event listeners. (#34503) 2020-02-24 17:30:04 -08:00
using-libraries.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
visual-studio-2015.md docs: remove redundant whitespaces and fix minor typos (#33422) 2019-10-29 11:39:17 -07:00
web-worker.md docs: add missing command in `WebWorker` guide (#36397) 2020-04-06 09:29:17 -07:00
workspace-config.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
zone.md docs(zone.js): fix typos in NgZone guide code example (#36597) 2020-04-13 08:16:59 -07:00