Hello friends, In this video, we are gonna look for Eager Loading, Lazy Loading, and Pre-Loading Strategy available in Angular and how you can easily implement Lazy and Pre Loading in your existing Angular application.
Part 02: • Lazy Loading Of Compon...
GitHub Project: bit.ly/2GA7b1j
Custom Preload Strategy: bit.ly/3mZSZ0W
What is Eager Loading?
Feature modules under Eager Loading would be loaded before the application starts. This is the default module-loading strategy.
What is Lazy Loading?
Feature modules under Lazy Loading would be loaded on-demand after the application starts. It helps to start the application faster.
What is Pre-Loading?
Feature Modules under Pre-Loading would be loaded automatically after the application starts.
When to use Eager Loading?
Case 1: Small size applications. In this case, it’s not expensive to load all modules before the application starts, and the application will be faster and more responsive to process requests.
Case 2: Core modules and feature modules that are required to start the application. These modules could contain components of the initial page, interceptors (for authentication, authorization, and error handling, etc.), error response components, top-level routing, and localization, etc. We just have to eagerly load these modules to make the application function properly despite the application size.
When to use Lazy Loading?
The scenario of applying Lazy Loading is relatively simple and straightforward. In a big-size web application, we can lazily load all other modules that are not required when the application starts.
When to use Pre-Loading?
Compared with Eager Loading and Lazy Loading, Pre-Loading is not so much frequently used in web application development. Based on my understanding of this loading strategy, Pre-Loading would be favorable for two cases though.
Case 1: Medium size application. In this scenario, we can make the application start faster since it will load all other modules later that are not required to run the application. And the application would be more responsive to process users’ requests than applying Lazy Loading strategy since the application will load all these modules after the application started.
Case 2: Some specific modules that users are very likely to use after the application started. In this scenario, we can pre-load these feature modules and still lazy load other modules.
Hope This Video Is Helpful For You
✅Don't Forget to LIKE 👍 SUBSCRIBE 🔔️️️ SHARE ↗️
↪️bit.ly/2Kze2oi
► Connect With Us! ◄
Facebook - bit.ly/2tbOg3b
Google+ - bit.ly/2jrWz6g
Instagram - bit.ly/2tbR14z
Reddit - bit.ly/2J5Vqfm
Twitter - bit.ly/2ICJFfb
★★★Watch my most recent videos playlist★★★
Kali Linux - goo.gl/36M3JD
Python Coding - goo.gl/dCtyrS
Java Coding - goo.gl/oxFo8W
Deep Web - goo.gl/7ueKNh
Basic Computer - goo.gl/kwFXM3
Hacking - goo.gl/vjT916
Games Benchmark - goo.gl/eshw3T
Gaming - goo.gl/mLuQwf
Notepad Tricks -goo.gl/3uapMJ
CMD Tricks - goo.gl/x1KH8C
Facebook Tricks - goo.gl/1JV9Fz
Problem Solved - goo.gl/eJwjXq
Gmail Tricks - goo.gl/fSpbaB
And talking about subscribing, please subscribe to my channel,
if you enjoyed this video and want more how-to, Thanks so much for watching!
27 авг 2024