1

I am new to Angular. I passed the "Tour of Heroes: the vision" tutorial. In the end i got working app, it's all cool but one thing make me go mad!

enter image description here

334 requests and 7.6s loading!

My question is how to combine all that angular components in one file and tell angular not to load them all?

Thank in advance!

DenimTornado
  • 345
  • 4
  • 14

2 Answers2

0

Browsers has limitation on request count, see

You can use gulp-concat to unify files into a single file

Community
  • 1
  • 1
asdf_enel_hak
  • 7,474
  • 5
  • 42
  • 84
  • Ok, but how to collect such files: http://localhost:3000/js/node_modules/@angular/platform-browser/src/browser/location/browser_platform_location.js http://localhost:3000/node_modules/@angular/compiler/src/view_compiler/expression_converter.js There are many nested sub folders. – DenimTornado May 13 '16 at 14:10
  • npm modules are not required to be included to unified file – asdf_enel_hak May 13 '16 at 14:14
0

I found this CDN- https://cdnjs.com/libraries/angular.js/

Why not only use the components you need and also the above cdn has minified versions.

shiv
  • 383
  • 1
  • 4
  • 17