Reputation: 63
hello I have created angular 2 app after successfully compile when I run it to browser it is taking too much time to load when I have checked on networks it is requesting for 14 items and 8 mb downloaded , can someone tell me how to reduce time of it
Upvotes: 0
Views: 1285
Reputation: 606
please check you project size and theme assets size it is also matters as u said 14 items and 8 mb downloaded means some js are being download on load project so it is taking time so first delete extra sutff from your project if you are using these just put only required, pages, images, js, etc which are used in your project
Upvotes: 0
Reputation: 6821
2 Things you can directly do:
When you will deploy your app, use: AOT:
ng-build --prod --aot
This will be more optimized.
And next, you can do LazyLoading.
https://angular.io/guide/ngmodule#lazy-loading-modules-with-the-router
But without your code, it will be hard to help more.
Upvotes: 1