'Angular pre-render only the app shell component?

I would like to use the app shell feature for my site to show a loading icon while the site loads. Only issue is that the app shell renders the whole site rather than the contents of the app shell component. Is there a way so only the html in the app shell gets rendered?

Reproduce:

  1. Create a new angular app
  2. ng generate app-shell
  3. ng run my-app:app-shell:production


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source