dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.6k stars 25.29k forks source link

UseSpaPrerendering deprecated in netcore 3.0 #16165

Closed pawod closed 4 years ago

pawod commented 4 years ago

I suppose using the UseSpaPrerendering() extension method in netcore does not work anymore. How can I set up SSR and pass data to my angular app?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

pawod commented 4 years ago

followed this article's instructions and it works like a charm for netcore 3.1 - despite the deprecation warning:

https://medium.com/@pieterjandeclippel/server-side-rendering-in-asp-net-core-angular-6df7adacbdaa

zd-dalibor commented 4 years ago

@pawod @Rick-Anderson Will this deprecation lead to removing UseSpaPrerendering method in the future releases of netcore?

If this is true, will there be some alternatives for this or netcore developers plan to totally abandon Angular and React SPAs in favour of Blazor???

Rick-Anderson commented 4 years ago

See this GitHub comment

The recommendation is to rely on the SPA framework provided SSR capabilities. For Angular, SSR support is now integrated into Angular CLI. Here is a good article about it: https://medium.com/@MarkPieszak/angular-universal-server-side-rendering-deep-dive-dc442a6be7b7