Aspnetcore.docs: Update Angular SSR docs to match updated Angular 6 template

Created on 19 Jan 2019  Â·  7Comments  Â·  Source: dotnet/AspNetCore.Docs

Moved from #8139

_From @SteveSandersonMS on August 16, 2018 17:24_

The current docs are at https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-2.1&tabs=visual-studio#server-side-rendering

Discussed with @ryanbrandenburg

_Copied from original issue: aspnet/Templating#677_


Document Details

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

P1 PU Source - Docs.ms

Most helpful comment

@ryanbrandenburg in #8139 danroth27 assigned ryanbrandenburg on Aug 16, 2018
Can you give me an ETA on this?

All 7 comments

@ryanbrandenburg in #8139 danroth27 assigned ryanbrandenburg on Aug 16, 2018
Can you give me an ETA on this?

The only way to publish an Angular web portal on the web is using Angular Universal because SEO so on my project I configured the SSR with Angular 7 using the UseSpaPrerendering configuration

When a brower asks for the first time the HTML with the first GET, the server gets between 3 to 7 seconds to render the page.
I have the same issue with IIS Express and IIS 8.5 on Windows Server 2012 R2.
TTFB (Time to First Byte) has to be about 200 - 300 ms.

The use case I'm investigating doesn't involve HTTP requests from the server side. Just the rendering of a simple static page from several graphical components.

It seems that the main.js file (400k in my case) is loaded and compiled for each request taking long time to respond.

Is there any way to configure a cache for the NodeJS instance or whatever to speed up this process?

I would really like to see the docs updated! Thank you @Rick-Anderson for pushing this!

Seriously? Some dev updates this but forgets to verify the documentation. Very bad.

Oh, by the way, wake up!

Now on angular 7 still outdated docs

@fabiomilheiro I agree the docs should be updated. But please be nice. Microsoft open-sourced Visual Studio to make development available to everybody. This brings a lot of maintenance with it... That's why anyone can contribute to this.

Now for your issue...

I found a repository on GitHub with a working setup:
https://github.com/joshberry/dotnetcore-angular-ssr. Thanks to Josh Berry.

I tried to recreate the project with angular 8.1, .NET Core 2.2, The result of this repository with a short summary is available here: https://github.com/PieterjanDeClippel/AspNetCoreSpaPrerendering

For now I'd like to redirect you to a Medium article:
https://medium.com/@pieterjandeclippel/server-side-rendering-in-asp-net-core-angular-6df7adacbdaa

Maybe I'll complete the docs about SSR, but for now you'll have to stick with this article...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rick-Anderson picture Rick-Anderson  Â·  3Comments

madelson picture madelson  Â·  3Comments

Rick-Anderson picture Rick-Anderson  Â·  3Comments

danroth27 picture danroth27  Â·  3Comments

AnthonyMastrean picture AnthonyMastrean  Â·  3Comments