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
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
There's a working image resizing example following this approach [here](https://github.com/aspnet/JavaScriptServices/tree/dev/samples/misc/NodeServicesExamples) - see the [C# code](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/misc/NodeServicesExamples/Controllers/ResizeImage.cs) and the [JavaScript code](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/misc/NodeServicesExamples/Node/resizeImage.js).
259
+
There's a working image resizing example following this approach [here](../../samples/misc/NodeServicesExamples) - see the [C# code](../../samples/misc/NodeServicesExamples/Controllers/ResizeImage.cs) and the [JavaScript code](../../samples/misc/NodeServicesExamples/Node/resizeImage.js).
Now you can use the [`angular2-universal` APIs](https://github.com/angular/universal) from your `boot-server.ts` TypeScript module to execute your Angular component on the server. The code needed for this is fairly complex, but that's unavoidable because Angular supports so many different ways of being configured, and you need to provide wiring for whatever combination of DI modules you're using.
225
225
226
-
You can find an example `boot-server.ts` that renders arbitrary Angular components [here](https://github.com/aspnet/JavaScriptServices/blob/dev/templates/AngularSpa/ClientApp/boot-server.ts). If you use this with your own application, you might need to edit the `serverBindings` array to reference any other DI services that your Angular component depends on.
226
+
You can find an example `boot-server.ts` that renders arbitrary Angular components [here](../../templates/AngularSpa/ClientApp/boot-server.ts). If you use this with your own application, you might need to edit the `serverBindings` array to reference any other DI services that your Angular component depends on.
227
227
228
228
The easiest way to get started with Angular server-side rendering on ASP.NET Core is to use the [aspnetcore-spa generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/), which creates a ready-made working starting point.
229
229
@@ -299,7 +299,7 @@ If you want to enable server-side prerendering too, follow the same process as d
299
299
300
300
The above example is extremely simple - it doesn't use `react-router`, and it doesn't load any data asynchronously. Real applications are likely to do both of these.
301
301
302
-
For an example server-side boot module that knows how to evaluate `react-router` routes and render the correct React component, see [this example](https://github.com/aspnet/JavaScriptServices/blob/dev/templates/ReactReduxSpa/ClientApp/boot-server.tsx).
302
+
For an example server-side boot module that knows how to evaluate `react-router` routes and render the correct React component, see [this example](../../templates/ReactReduxSpa/ClientApp/boot-server.tsx).
303
303
304
304
Supporting asynchronous data loading involves more considerations. Unlike Angular applications that run asynchronously on the server and freely overwrite server-generated markup with client-generated markup, React strictly wants to run synchronously on the server and always produce the same markup on the server as it does on the client.
305
305
@@ -327,7 +327,7 @@ As a simple example, here's how you can set up Webpack to build TypeScript files
327
327
328
328
```
329
329
npm install --save typescript ts-loader
330
-
```
330
+
```
331
331
332
332
And if you don't already have it, you'll find it useful to install the `webpack` command-line tool:
333
333
@@ -641,8 +641,8 @@ by using the `HotModuleReplacementClientOptions` property on `WebpackDevMiddlewa
0 commit comments