angular/aio/content/examples
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 build(docs-infra): update project structure to cli@9 6/12 (index.html) (#36015) 2020-03-18 10:00:01 -07:00
ajs-quick-reference docs: remove gender prefixes from examples (#29972) 2019-05-20 16:42:59 -07:00
animations docs(animations): increase wait time for status-slider animation (#35089) 2020-02-04 15:57:37 -08:00
architecture build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
attribute-binding test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
attribute-directives build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
binding-syntax test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
bootstrapping test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
built-in-directives test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
built-in-template-functions test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
cli-builder/src fix(docs-infra): convert hard-coded cli-builder examples into a proper mini-app (#34362) 2020-01-21 13:12:18 -05:00
comparing-observables/src fix(docs-infra): convert hard-coded comparing-observables examples into a proper mini-app (#34327) 2020-01-21 13:14:46 -05:00
component-interaction build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
component-styles build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dependency-injection build(docs-infra): switch docs examples to Ivy (#36143) 2020-04-06 15:31:07 -07:00
dependency-injection-in-action fix(docs-infra): fix parameters with @Optional() decorator do not match declared, optional type (#35150) 2020-02-07 09:58:31 -08:00
displaying-data build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
docs-style-guide build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dynamic-component-loader build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dynamic-form build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
elements build(docs-infra): update project structure to cli@9 10/12 (tsconfig.json) (#36015) 2020-03-18 10:00:01 -07:00
event-binding test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
feature-modules test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
form-validation build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
forms build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
forms-overview build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
getting-started fix(docs-infra): remove routerLink from top-bar (#35951) 2020-03-13 08:25:39 -07:00
getting-started-v0 fix(docs-infra): remove routerLink from top-bar (#35951) 2020-03-13 08:25:39 -07:00
hierarchical-dependency-injection build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
http build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
i18n build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
inputs-outputs test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
interpolation test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
lazy-loading-ngmodules test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
lifecycle-hooks test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
ngcontainer docs: replace class hero to interface wherever class properties not used (#34022) 2019-11-25 11:37:39 -05:00
ngmodules test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
observables build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
observables-in-angular build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
pipes docs: correct types in transform method to match specification. (#29812) 2019-05-15 14:24:20 -07:00
practical-observable-usage build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
property-binding test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
providers test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
providers-viewproviders build(docs-infra): update project structure to cli@9 6/12 (index.html) (#36015) 2020-03-18 10:00:01 -07:00
reactive-forms test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
resolution-modifiers build(docs-infra): update project structure to cli@9 6/12 (index.html) (#36015) 2020-03-18 10:00:01 -07:00
router test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
rx-library build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
schematics-for-libraries build(docs-infra): update project structure to cli@9 6/12 (index.html) (#36015) 2020-03-18 10:00:01 -07:00
security build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
service-worker-getting-started build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
set-document-title build(docs-infra): update project structure to cli@9 6/12 (index.html) (#36015) 2020-03-18 10:00:01 -07:00
setup build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
structural-directives build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
styleguide fix(docs-infra): fix parameters with @Optional() decorator do not match declared, optional type (#35150) 2020-02-07 09:58:31 -08:00
template-expression-operators test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
template-reference-variables test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
template-syntax test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
testing build(docs-infra): renamed e2e property of example-config.json to tests (#36143) 2020-04-06 15:31:07 -07:00
toh-pt0 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
toh-pt1 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
toh-pt2 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
toh-pt3 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
toh-pt4 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
toh-pt5 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
toh-pt6 refactor(docs-infra): update main.ts in Tour-of-Heroes examples to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
two-way-binding test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
universal docs: remove unneeded code from universal example/guide (#36483) 2020-04-16 09:43:42 -07:00
upgrade-lazy-load-ajs build(docs-infra): update project structure to cli@9 6/12 (index.html) (#36015) 2020-03-18 10:00:01 -07:00
upgrade-module docs: migrate examples from @angular/http to @angular/common/http (#28296) 2019-03-11 10:52:17 -07:00
upgrade-phonecat-1-typescript build(docs-infra): switch docs examples to Ivy (#36143) 2020-04-06 15:31:07 -07:00
upgrade-phonecat-2-hybrid build(docs-infra): switch docs examples to Ivy (#36143) 2020-04-06 15:31:07 -07:00
upgrade-phonecat-3-final test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) 2020-04-06 15:31:07 -07:00
user-input docs(docs-infra): use recommended type assertion (#31042) 2019-10-02 13:25:39 -07:00
.gitignore refactor(docs-infra): update universal example to match latest CLI (#36483) 2020-04-16 09:43:41 -07:00
tsconfig.json build(aio): give intellisense to the examples 2017-04-15 22:15:54 +01:00
tslint.json refactor: remove tslint no-use-before-declare rule (#30288) 2019-05-07 10:25:36 -07:00