服务器端呈现在 angular universal in iis 中不起作用

server side rendering is not working in angular universal in iis

我提到了 https://github.com/angular/universal-starter 并在 angular5.server 中实现了在 iis.It 中托管后侧面渲染不起作用 localhost:4000

谢谢

ASP.NET 使用 JavaScriptServices。它提供:

Microsoft.AspNetCore.SpaTemplates plugs into dotnet new, providing project templates for Angular 2, Aurelia, Knockout, React, and React+Redux applications. Microsoft.AspNetCore.SpaServices is how SpaTemplates-produced projects work internally. It provides useful features for SPA applications, such as server-side rendering for Angular and React applications, plus integration with Webpack build middleware. Microsoft.AspNetCore.NodeServices is how SpaServices works internally. It’s a low-level library that gives a fast, robust way for ASP.NET Core applications to run arbitrary JavaScript code on the server.

TUTORIAL

#Server-side-prerendering

aspnetcore-angular2-universal. After running it,I got Child compilation failed error

@kamalav,我在本地测试过。

要求: 确保您至少安装了 Node 6.x 或更高版本(w/ npm 3+)! 此存储库使用 ASP.Net Core 2.0,它对 .NET Core Runtime 2.0.0 和 .NET Core SDK 2.0.0 有硬性要求。请从这里安装这些项目

  1. npm 安装
  2. npm 运行 build:dev
  3. dotnet 恢复
  4. 网络运行