Skip to content

Add option to turn off SSR(Server Side Rendering) #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
skorunka opened this issue Apr 20, 2017 · 11 comments
Closed

Add option to turn off SSR(Server Side Rendering) #202

skorunka opened this issue Apr 20, 2017 · 11 comments

Comments

@skorunka
Copy link

skorunka commented Apr 20, 2017

Add an option to turn off rather than force user to delete/comment things.

@hheexx
Copy link

hheexx commented Apr 20, 2017

Also maybe disable SSR for development?
It would speed up webpack compilation twice.

We just did that yesterday.
No problems for now.

@skorunka
Copy link
Author

Hi, could you share your code please? And BTW: How do you bundle CSS and include it in HTML master page when you turn off SSR?

@MarkPieszak
Copy link
Member

This would be a nice idea actually, make it a little easier for people to Opt-in/out of it.

I think by default it might almost be easier to have it Off, as I don't think most apps need the benefits of SSRendering. Let me see what I can come up with! Good idea @skorunka

@TimHarker
Copy link
Contributor

Especially since things like Material 2 don't support it (at this point) - I've turned mine off 👍 .

@skorunka
Copy link
Author

@TimHarker When you turn off SSR, how do you bundle CSS and insert it into page? I had to do this: #161 (comment)

@vicver82
Copy link

@TimHarker Could please kindly share how you totally disabled SSR and cleaned both your Angular and .NET server code? Thanks!

@MarkPieszak
Copy link
Member

You can just comment out the code in HomeController, make it do nothing but return View(); for the Index Route. Return the _index.cshtml file to <app></app> instead of ViewData["SpaHtml"] and that should do it, there might be a few more things, but that'll work I believe. @vicver82

@vicver82
Copy link

vicver82 commented May 25, 2017

@MarkPieszak Thank you Mark!
I've done that, as per your instructions in the Readme file. I'm currently trying to clean all ng-side files, and to get aot working again.

@isaacrlevin
Copy link
Contributor

@vicver82 this issue good to close?

@vicver82
Copy link

Yes, thank you.

@MarkPieszak
Copy link
Member

Yeah we can close it for now, eventually we can work on some type of flag that handles turning it on/off for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants