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: docs/documentation/stories/universal-rendering.md
+26-17Lines changed: 26 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ Install `@angular/platform-server` into your project. Make sure you use the same
23
23
> You'll also need ts-loader (for your webpack build we'll show later) and @nguniversal/module-map-ngfactory-loader, as it's used to handle lazy-loading in the context of a server-render. (by loading the chunks right away)
## Step 1: Prepare your App for Universal rendering
@@ -33,7 +34,7 @@ The first thing you need to do is make your `AppModule` compatible with Universa
33
34
34
35
### src/app/app.module.ts:
35
36
36
-
```javascript
37
+
```typescript
37
38
@NgModule({
38
39
bootstrap: [AppComponent],
39
40
imports: [
@@ -143,7 +144,7 @@ target:
143
144
144
145
## Building the bundle
145
146
146
-
With these steps complete, you should be able to build a server bundle for your application, using the `--app` flag to tell the CLI to build the server bundle, referencing its index of `1` in the `"apps"` array in `.angular-cli.json`:
147
+
With these steps complete, you should be able to build a server bundle for your application, using your project name and command name from `angular.json`to tell the CLI to build the server bundle.
147
148
148
149
```bash
149
150
# This builds your project using the server target, and places the output
@@ -216,6 +217,9 @@ import * as express from 'express';
0 commit comments