Server Side Rendering Angular 2 in ASP.NET with Edge.js

I'm exploring the possibility of rendering Angular 2 on the server side using Edge.js in an ASP.NET MVC application.

I'm aware that the Angular Universal Starter Kit has part of this equation: https://github.com/alexpods/angular2-universal-starter

However, it is using a Node.js server. I'd rather not add a Node.js server as an extra web server on top of the existing IIS server. My thought is I can perform the rendering of the Angular on the server side using Edge.js (ie, to run the necessary JavaScript to generate the markup).

I am very new to Angular 2, so getting an example up and running is non-trivial for me. Based on this closed issue, I'd say there is currently no effort being made to add support for Edge.js (though it was being considered at one point): https://github.com/angular/universal/issues/40

Does anybody know if rendering Angular on the server side using Edge.js from an ASP.NET MVC app is possible?

By the way, I'm stuck on .NET 4.5.2 (Umbraco requires it), so I can't move to .NET Core and make use of this: https://github.com/MarkPieszak/aspnetcore-angular2-universal

链接地址: http://www.djcxy.com/p/5292.html

上一篇: Angular通用服务器呈现WebSocket

下一篇: 服务器端使用Edge.js在ASP.NET中渲染Angular 2