Currently our templates are in html files, while the build does minify them (with htmlmin) It appears there are two approaches to optimize templates loading in angular.
using
$templateCache
as explained here. Which means putting the minified templates into a js file, probably with this grunt plugin.Inlining the template,which means using them with angular
script
directive, probably using this grunt plugin
from npm usage stats I can judge that the first option is more popular, but I'm not sure why, what are the tradeoffs between the two options and which gives better performance.
Thanks!