Reputation: 1
Prerender allows you to generate static pages from a route map. This is necessary for SEO, because by default Angular gives empty html. If you pass /post-1, /post-2 to the preender, it will generate the following files:
dist/app/browser/post-1/index.html
dist/app/browser/post-2/index.html
If the user goes to /post-1 or /post-2, the server will respond with the previously created pages. However, once loaded, Angular will start to restore state and also execute API requests.
Going through the internal roots, the user will not see any other prerender pages. Angular will create them on the fly. The client will get the rendered version if forced to refresh.
How to make ssg page take requests from api only at build and never update anything else on its own?
I was thinking of disabling hydration, or caching any requests. There is not much information on the internet about this
Upvotes: 0
Views: 86