Angular 2 Build Process

Last week I setup ludohenin’s inlineNg2Template in a gulp build in an effort to improve my app’s performance. I got some improvements but decided I needed to look at bundling the app for better gains. SystemJS-Builder is a package which will allow us to pre-compile the app into one file and hopefully see a big drop in load times.

Here’s where we’re at currently.

Requests Load Time Size
Orginal 404 5.31s 2.2Mb
Inline Templates 355 5.2s 2.1Mb

Continue reading Angular 2 Build Process

Angular 2 Inline Templates

Earlier when looking at versioning/cache busting I changed my templates from using the templateURL: ‘./template.html’ syntax to template: require(‘./template.html’).  The more time I spend building out pages on the site, the slower it’s getting. Today, we’re going to look at in-lining html templates in our javascript files as a build step.

This should reduce the amount of http requests and hopefully load time as well. To load the homepage, my site is making 404 http requests, transferring 2.2Mb of data, and takes 5.31s to load. I’d like to bring the initial page load time down to 1s or less if possible.

Continue reading Angular 2 Inline Templates