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
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,7 @@ the client. This means that the application generally renders more quickly, givi
8
8
layout before it becomes fully interactive.
9
9
10
10
For a more detailed look at different techniques and concepts surrounding SSR, please check out this
11
-
[article](https://developers.google.com/web/updates/2019/02/rendering-on-the-web). For reference, Angular Universal
12
-
falls under the category of "SSR with (Re)Hydration".
You can easily prepare an app for server-side rendering using the [Angular CLI](guide/glossary#cli).
15
14
The CLI schematic `@nguniversal/express-engine` performs the required steps, as described below.
@@ -74,15 +73,16 @@ Navigation via `routerLinks` works correctly because they use the native anchor
74
73
You can go from the Dashboard to the Heroes page and back.
75
74
You can click a hero on the Dashboard page to display its Details page.
76
75
77
-
Notice, however, that clicks, mouse-moves, and keyboard entries are inert.
78
-
76
+
If you throttle your network speed so that the client-side scripts take longer to download (instructions below),
77
+
you'll notice:
79
78
* Clicking a hero on the Heroes page does nothing.
80
79
* You can't add or delete a hero.
81
80
* The search box on the Dashboard page is ignored.
82
81
* The *Back* and *Save* buttons on the Details page don't work.
83
82
84
83
User events other than `routerLink` clicks aren't supported.
85
-
You must wait for the full client app to bootstrap and run.
84
+
You must wait for the full client app to bootstrap and run, or buffer the events using libraries like
85
+
[preboot](https://github.com/angular/preboot), which allow you to replay these events once the client-side scripts load.
86
86
87
87
The transition from the server-rendered app to the client app happens quickly on a development machine, but you should
88
88
always test your apps in real-world scenarios.
@@ -100,9 +100,9 @@ The server-rendered app still launches quickly but the full client app may take
100
100
101
101
There are three main reasons to create a Universal version of your app.
102
102
103
-
1. Facilitate web crawlers (search engine optimization, aka SEO)
103
+
1. Facilitate web crawlers through [search engine optimization (SEO)](https://static.googleusercontent.com/media/www.google.com/en//webmasters/docs/search-engine-optimization-starter-guide.pdf)
104
104
1. Improve performance on mobile and low-powered devices
105
-
1. Show the first page quickly (first-contentful paint, aka FCP)
105
+
1. Show the first page quickly with a [first-contentful paint (FCP)](https://developers.google.com/web/tools/lighthouse/audits/first-contentful-paint)
106
106
107
107
{@a seo}
108
108
{@a web-crawlers}
@@ -115,9 +115,6 @@ These web crawlers may be unable to navigate and index your highly interactive A
115
115
Angular Universal can generate a static version of your app that is easily searchable, linkable, and navigable without JavaScript.
116
116
Universal also makes a site preview available since each URL returns a fully rendered page.
0 commit comments