I\'ve tried my best to bring the bundle size of Angular 2 down and have been relatively successful in reducing the size to ~300kb (Angular 2 + jquery + bootstrap + some other sm
Here are some other things that you can do to reduce the loading time of the static resources.
You could try to add a second script in your index.html
, which would then load all your other files (just as the index.html
is doing now).
Then you'd have a bunch of AJAX requests for your files and could add them to the DOM. To track the progress, you could try to use an HTTP HEAD request with the Content-Length
header.
I am not sure about reflect/zone.js, but for download we can follow this
<body onload="showApp()">
<div class="progress-bar" id="loadingContainer"></div>
<my-app style="display: none"><my-app>
</body>
showApp() {
document.getElementById('loadingContainer').style.display = "none";
document.getElementsByTagName('my-app')[0].style.display = null;
}