Add static pre-rendering to ng add @nguniversal/express-engine

前端 未结 2 1352
时光说笑
时光说笑 2020-12-25 09:23

I added server side rendering to my Angular project by following the Angular documentation here.

I found out that the commands to run the static pre-renderin

2条回答
  •  时光取名叫无心
    2020-12-25 10:07

    [Edit] Downgrading to version 0.9.0 actually seems to be the best option.

    Something to tack onto the accepted answer (can't comment yet) you might run into a http-server error if you are using version .0.11.0. There is a bug with ecstatic on version 0.11.0. If you are having the problem read the thread here and check out some of the solutions. Either downgrade your version of ecstatic if you have this issue and don't want to upgrade http-server, or explicitly navigate to index.html to get your page to render.

    I was very excited to get SSR up and running, but ran into this problem and it really ate up some time. I hope this helps.

提交回复
热议问题