The problem is not specific to Angular4. Any data created dynamically using javascript will first be displayed as empty, and then its contents will be loaded. I assume you are looking at the Google Page Speed ββIndex .
To find out what Google sees:
- comment out external css
- comment out your external js
This will be the initial google view. After that, Google will extract external files, run your javascript and display the page. Google page speed will punish you for any changed pixels above addition before and after receiving external assets.
Angular Universal (or any server-side processing, as this is not an angular problem) will solve this problem.
Hope this helps.
Tomer almog
source share