Eager Loading, Lazy Loading, and Pre-Loading in Angular

Published: 07 November 2020
on channel: Mighty Ghost Hack
10,454
151

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 Component In Angular ...  

GitHub Project: https://bit.ly/2GA7b1j
Custom Preload Strategy: https://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 ↗️
↪️https://bit.ly/2Kze2oi

► Connect With Us! ◄

Facebook - http://bit.ly/2tbOg3b
Google+ - http://bit.ly/2jrWz6g
Instagram - http://bit.ly/2tbR14z
Reddit - https://bit.ly/2J5Vqfm
Twitter - https://bit.ly/2ICJFfb

★★★Watch my most recent videos playlist★★★

Kali Linux - https://goo.gl/36M3JD

Python Coding - https://goo.gl/dCtyrS

Java Coding - https://goo.gl/oxFo8W

Deep Web - https://goo.gl/7ueKNh

Basic Computer - https://goo.gl/kwFXM3

Hacking - https://goo.gl/vjT916

Games Benchmark - https://goo.gl/eshw3T

Gaming - https://goo.gl/mLuQwf

Notepad Tricks -https://goo.gl/3uapMJ

CMD Tricks - https://goo.gl/x1KH8C

Facebook Tricks - https://goo.gl/1JV9Fz

Problem Solved - https://goo.gl/eJwjXq

Gmail Tricks - https://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!


Watch video Eager Loading, Lazy Loading, and Pre-Loading in Angular online without registration, duration hours minute second in high quality. This video was added by user Mighty Ghost Hack 07 November 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 10,454 once and liked it 151 people.