Hi,

On Tuesday, October 4, 2016 at 12:12:13 AM UTC+2, Ed Thompson wrote:
>
> I have about 30 html files in my Angularjs 1.x app.  For my production 
> build, I am trying to decide if I should keep them separate files, or if I 
> should combine them into a single file at build time as a single file with 
> multiple <script ng-template> blocks.  Thoughts?
>

 Well, depends on many things. Are at least some of them huge but can be 
lazy-loaded? Makes sense to leave them alone. On the other hand, (*warning: 
bad practice) *I've had 50+ directives and views and shipped off in dev 
mode. It was an internal tool, but still. 

The best thing you can do is turn of 3G throttling in dev tools and try to 
load on a mobile-like view. If the whole thing is slow enough, you'll want 
to wrap it in ng-template, if not, maybe it's too much effort for now.

With all that out, I *think* that it would be best (though not always 
following that advice myself) if you have the tooling set right from the 
start. If I don't depend on doing things manually, I won't suck :) 
Automated build steps can also catch some weird bugs (and introduce new 
ones, granted), speed up your time to shipping etc, *and* improve user 
experience. It is nicer to debug production bugs on development version, 
though, so there's that :)

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to