Reputation: 2569
I'm writing a test with AngularJS 2, then i look at the "Network" section of the Developer Tools and I see : 35 requests.
RXJS only: 20 requests.
Since the browsers have a limited amount of connections, the page loads in 400ms, even if it's little-sized files.
In this test, i just have:
I don't have another component.
What I would like to do is lower the 35 requests. Theorically, i should have 4 requests: index.html, angular2.js, main.js and app.component.js .
Is it even possible or AngularJS 2 is built in a way there will always have lots of little requests ?
EDIT: I'm using gulp to launch tsc.
Upvotes: 0
Views: 49
Reputation: 3544
I was facing the same problem or i can say everyone must be facing the same problem but i got a solution for this and its working cool ....
the number of requests can be handled with the use of gulp or webpack , for tha you just check this out
https://www.youtube.com/watch?v=j9w5hFit5rM
it helped me and i'm sure it will help evryone for this issue :)
Upvotes: 1