Aspnetcore.docs: Documentation Wrong for Asp.Net Core 2.2 Angular Template

Created on 7 Dec 2018  Â·  8Comments  Â·  Source: dotnet/AspNetCore.Docs

As the ASP.Net Core 2.2 Template which ships with VS 2019 Preview has finally been upgraded to use angular 6, the documentation on ssr is wrong. Angular 6 does not use the angular-cli.json. There is a new configuration file.


Document Details

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

P2 Source - Docs.ms doc-bug

Most helpful comment

Checkout this example: https://github.com/joshberry/dotnetcore-angular-ssr.

I started fresh with asp.net 2.2 and angular 7.2 and is was not too difficult to setup the hosting and server side rendering. It doesn't require node_modules to be deployed to the server either. Let me know if you see any issue with or shortcomings to this setup.

All 8 comments

Any idea how to make SSR work with 2.2? The docs are not useful.

So, first of all this guide is wrong. some steps are incorrect fo .net core 2.2 template. But full publishing project contain folder node_modules! As for me this implementation is not good idea. I think if you are using Angular SSR and .net core API you should to separate this two projects and add CORS to .net. So you have node.js with angular SSR witch call your .net core API by CORS.

Checkout this example: https://github.com/joshberry/dotnetcore-angular-ssr.

I started fresh with asp.net 2.2 and angular 7.2 and is was not too difficult to setup the hosting and server side rendering. It doesn't require node_modules to be deployed to the server either. Let me know if you see any issue with or shortcomings to this setup.

@joshberry Thank you! You're the best!

@joshberry Thanks for the example, I get this error:

AngularCliBuilder: Error: Unknown option: '--watch'

Any ideas? Thanks!

Using: Net Core 3.0-preview (I know the example is in 2.2 but i'm doing some testing)
Angular: 7.3

Now using .netcore 3.0 it seems that SSR will not be managed out of the box in aspnet? this won't go to a new package i assume, and wont be maintained anymore by aspnet team?

image

@blogcraft for anyone who needs I had just updated my sample https://github.com/sketch7/dotnet-ngx-sample

Unfortunately, I haven't seen @joshberry example before now - but its very similar to his

NOTE: theres a bit of a hack inorder for it to work, as latest angular doesnt work so I had to copy AngularCliBuilder and modify

2.2 is out of support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rick-Anderson picture Rick-Anderson  Â·  3Comments

royshouvik picture royshouvik  Â·  3Comments

aaron-bozit picture aaron-bozit  Â·  3Comments

StevenTCramer picture StevenTCramer  Â·  3Comments

Raghumu picture Raghumu  Â·  3Comments