Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Angular migration 14 to 15 / 16: Has angular universal ceased to put <!– this page was prerendered with angular universal –> for pre-rendered pages?

I recently migrated from version 14 of angular to version 15 (and then to 16) and pre-rendering with angular universal seems to have changed: It still seems to work afaict but the familiar <!-- this page was prerendered with angular universal --> has gone.

Questions:
Can I no longer rely on the added html-comment to quickly verify, prerendering and ssr is working? i.e. is it gone?
If yes, why and why can I not find anything online?
If no, what might I have broken during migration that killed it?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Since v15, you have ng-server-context in your DOM when the content has been generated by universal.

You would either have :

  • ng-server-context="ssr" when the content is generated dynamically
  • ng-server-context="ssg" when the content is being prerendered (static site generation)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading