TrilonIO / aspnetcore-angular-universal

ASP.NET Core & Angular Universal advanced starter - PWA w/ server-side rendering for SEO, Bootstrap, i18n internationalization, TypeScript, unit testing, WebAPI REST setup, SignalR, Swagger docs, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.46k stars 434 forks source link

asp.net core 3.1 #741

Open CarlosRamirezRamos opened 4 years ago

CarlosRamirezRamos commented 4 years ago

@MarkPieszak Making this project to work with core 3.1 show warnings about obsolete spaservices and nodeservices, what seems to break this kind of solutions at future .net 5. I'm starting a new project and would like ssr from .net core (running node or whatever solution), but is seem that it will be officially deprecated (https://github.com/dotnet/aspnetcore/issues/12890), so this great project ,this kind of ssr integration, will not be keep working if update. could you please help me to see or point me to how aspnet core angular ssr integration should be in a future (maybe no way)...

alexbenitez commented 4 years ago

@MarkPieszak is this starter now obsolete? Any kind of road map to support SSR integrated with .NET Core? Should we just plan on replacing the server side C# with NodeJS?

https://github.com/aspnet/Announcements/issues/379

dresdor commented 4 years ago

I was able to update an app that orginated with this template without much issue. The only real problem I found was getting the hot module replacement code working, which we were unable to do (and did not have the time to resolve it).

christopherpross commented 4 years ago

Any updates on this, because I am also interested on this.

MarkPieszak commented 4 years ago

Apologies for the delays everyone! It seems that yes MS has unfortunately decided to give-up support for so many of the underlying tools/libraries we need for not only Angular here, but React/Vue/etc. (Namely spaservices/nodeservices/etc). Very unfortunate that this all happened :(

Ideally the best way to go forward really is to use the Angular CLI and utilize Universal that way which means using Node.js etc.

At least this way a separately spun up server can handle all of the front-end and SSR, while potentially a separate Dotnet project could be the backend REST API only.

weedkiller commented 3 years ago

ASP .NET core 5 or (6 universal)

omikolaj commented 2 years ago

@MarkPieszak

Thank you for clarifying. I have finally found what I have been looking for. This whole time I thought that there was a way to achieve SSR for SPA (Angular, React, Vue etc) but the more I searched the more it appeared that it was not the case. Thus I kept thinking to myself that perhaps I would need to remove the angular app from .NET 6 server and have some other place host it such as a separate server running node handling front end bootstrap request and SSR.

The drawback to that approach is that users on iOS by default have the option checked "Prevent Cross-Site Tracking" so if your any cookies you want to pass back and fourth between your front end on a different URL and your back-end on a different URL, will not work by default.

https://stackoverflow.com/questions/14206531/mobilesafari-wont-send-back-cookies-set-with-cors/57343584?noredirect=1#comment123144033_57343584