How do you speed up angular development and reduce compilation times?
- Do TDD-style development (e.g. with Jest).
- Split up your code into feature modules which can be lazy loaded.
- Keep up-to-date with the Angular ecosystem.
- Use Storybook for developing UI components.
Similarly one may ask, how can I make angular faster?
So it is essential to follow some best practices to make sure page load times, and general application performance remains fast!
- Production Builds. Let's start simple!
- Lazy Loading Modules.
- Enable Production Mode.
- OnPush Change Detection.
- Preserve Whitespaces.
- Avoid Function Calls in Views.
- Avoid Getters in View.
- Pure Pipes.
Beside above, why is angular so slow?
If your Angular app is slow, it is a 99.999% chance that the cause is you are using default change detection strategy with lots of changes going on (i.e., lot's of element with lots of bound properties). The default change detection strategy can make large apps/pages run really slow.
Lazy Loading generally, is a concept where we delay loading of an object until it is needed. In Angular, all the JavaScript components declared in the declarations array app. module. ts are bundled and loaded in one fell swoop when a user visits our site.