I'm trying to set up a project in Asp.Net 4.5.2 (VS2017) with Angular 4.
All examples seem to use Asp.Net Core, but we're trying not to jump into .NET Core just yet, if possible.
We would like to have server side rendering though, samples seem to use this asp-prerender-module attribute from "Microsoft ASP.NET Core JavaScript Services".
Is it possible to render angular 4 server side with MVC 5?
-
1Officially, that is the only option you have. universal.angular.io/overview Since source code is open to the public, you can migrate it to ASP.NET Framework if it is imperative for your project.wannadream– wannadream2017-06-28 14:47:07 +00:00Commented Jun 28, 2017 at 14:47
-
"Angular Universal was originally built to work with a node.js back-end. There are adapters for most popular node.js server-side frameworks such as Express or Hapi.js. In addition to node.js, however, Angular Universal has ASP.NET Core support. In the near future we hope to add support for Java, PHP and Python." Quoted from Angular Universal docs bro :)trungvose– trungvose2017-06-28 15:33:37 +00:00Commented Jun 28, 2017 at 15:33
Add a comment
|
1 Answer
Officially there is no Asp.Net Framework (non Core) support.
As stated in https://universal.angular.io/overview/:
In addition to node.js, however, Angular Universal has ASP.NET Core support. In the near future we hope to add support for Java, PHP and Python
EDIT: "Microsoft ASP.NET Core JavaScript Services" only supports ASP.NET Core which means the site needs to deployed ASP.NET Core style. But this all can run in .NET 4.5.2 so you can still reference your good old .NET Framework libraries in your project.
3 Comments
Nitesh
any article or links to implement this? We have the same setup
Visualize
You can actually use the ASP.NET Core NodeServices with a plain old ASP.NET MVC (non-Core) project. With this you'd be able to call nodejs to render.