ecommerce

ANGULAR 17

Defer

4 Reviews
Angular 17 introduced a new defer block that lets you lazy load content based on specific conditions or events. In this tutorial, we will discuss why this is important and how to implement lazy loading strategically in our Angular applications.

Using lazy loading in Angular apps.

Your entire application can be loaded in one hit, but is it going to lead to an excellent user experience? Not likely. Loading only the parts of your Angular app that the user is actually going to use, then loading other parts of your Angular 17 application later, is a more efficient solution. So, we should try to split up larger applications and deliver only the required parts of the application to the user. Why is this? There are multiple reasons: Typically, Angular 17 components load when they are invoked through the template. Therefor, if you have a moderately complex Angular 17 application and you depend on a few components on the same page, then loading all components and initialize the app at the same time can lead to a slow application
Learn More