Initial page shows before rendering internal pages directly
See original GitHub issueHi. Trying Scully with an Angular 11 app (this also happened before updating Angular version). Defined my initial page / to be rendered. As the app has many other internal pages defined in the angular-routing files the issue happens when navigating directly to any other internal page, different from the initial page. The initial page gets rendered and it’s visible for a few seconds before rendering the internal page.
I can suppose that the reason for this is that the generated index.html has the initial page fully rendered and also includes a placeholder for the typical router-outlet, so internal pages will forcefully pass through the initial page.
Tried with initialNavigation: 'enabled',
on the app-routing.module file without any results. Also tried detaching the initial page from the DOM by wrapping it on a named div, and reattaching it when the route === initial_page ; same problem.
A workaround for this would be nice, as generating static pages for all internal pages is not an option. Regards.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
You should have the "internal’ routes redirected to
404.html
which is the originalindex.html
that is not pre-rendered. Again, this is a setting you should arrange for on your server. Not something Scully can provide much help in. If you use the original HTML, there will be not Scully pre-rendered content in there at all.I’m going to close this, as this is not something Scully can solve. It needs to be solved using the server’s redirect rules. Just as for all static site hostings.