SlideShare a Scribd company logo
IMPLEMENT LAZY
LOADING IN YOUR
EXISTING ANGULAR
APPLICATION (GET A
FASTER, BETTER AND
SUPERIOR
PERFORMANCE)
www.bacancytechnology.com
Angular is a great JavaScript framework of
modern-day for building interactive
components as well as elements. It is widely
used for building SPAs and dynamic
programming structure. The front-end
framework is based on TypeScript with
additional features like interfaces, classes, and
static typing that encourages component-based
development and make sure that components
are decoupled as well as conveniently reusable.
Images play a significant role in page-load
times, and that’s the reason if you want to
improve the performance of your web
application, lazy-load images come handy.
So, let’s start with
what is Lazy
Loading?
Lazy loading, also known as on-demand
loading, is an optimization technique that
delays the loading or elements or components
until they are brought into the viewport.
When you log in to/admin, you will come across
a JavaScript code ‘chunk’ specially designed for
the Admin dashboard. Likewise, when you load
/shop, you will get a similar “chunk,” specially
written for the Shop! The code is lazy loaded
and injected into the browser for the specific
use of the Shop module.
main.chunk.js // loaded everywhere
shop.chunk.js // lazy module
admin.chunk.js // lazy module
In a layman’s term, while scrolling any
eCommerce website, the bottom images of a
page will only be displayed when the user
scrolls there.
Lazy loading in
Angular, why it
needs your special
attention and
importance?
It is one of the proven ways to improve the
performance of your website.
Reduce Page Load Time: Load only requested
elements and helps to reduce the amount of
data to be loaded.
Conserving Bandwidth: Helps to save
bandwidth from the viewers as well as a web
browser. Deliver only required content and
refrain from sending unnecessary content.
Save System Resources: Render code only
needed. Save memory resources.
How to
Implement Lazy
Loading in
Angular?
ngx-loadable is a lightweight package for
implementing Angular based lazy loading
components. It contains a simple API to
support loading indicators.
How to
Implement ngx-
loadable?
Stap 1.
 Install ngx-loadable in npm/yarn and add
LoadableModule in your AppModule.
Stap 2. 
To add a module with a bootstrapped, follow the
listed below command using Angular CLI.
Make sure that module, as well as component
names are same.Adding components in the
bootstrap is significant as well.
Step 3.
Step 4.
Hovering on the mouse button, you will find
that LoginModal Module is pre-loaded. When
clicking shows it is still downloading, then
LoginModalComponent loads in the ngx-
loadable element.
Configure ngx-loadable using custom paths.
Bypassing configuration to the
LoadableModule.
Lazy-loading non-routable modules—ngx-
loadable is a convenient approach to managing
lazy loading.
To boost the performance of your application, I
strongly recommend it to optimize it step-by-
step, instead of doing it all together in one big
step. Once you follow the above steps and if you
see a chunk, then you have configured it in the
right way.
If you are not sure about how to do it and
looking for the experts who can help you
implement lazy loading into your existing app,
then hire Angular developers from us. We are a
globally renowned Angular development
company, offering top-of-the-line Angular
development services.
Thank You

More Related Content

What's hot (20)

Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | Salesforce
Rahul Malhotra
 
Designing an effective hybrid apps automation framework
Designing an effective hybrid apps automation framework
Andrea Tino
 
TypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Asp.net Overview and Controllers
Asp.net Overview and Controllers
Mustafa Saeed
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
Alexandre Marreiros
 
Springboot and camel
Springboot and camel
Deepak Kumar
 
Expose web service
Expose web service
Son Nguyen
 
Rise of the responsive single page application
Rise of the responsive single page application
Oren Shatken
 
Live session 2 lightning web component
Live session 2 lightning web component
SmritiSharan1
 
ASP.NET AJAX Basics
ASP.NET AJAX Basics
petrov
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
Mohamed Elkhodary
 
SpringBoot
SpringBoot
Jaran Flaath
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTO
Roy Sivan
 
EVOLVE'16 | Deploy | Varun Mitra | Introduction to AEM based e-commerce
EVOLVE'16 | Deploy | Varun Mitra | Introduction to AEM based e-commerce
Evolve The Adobe Digital Marketing Community
 
Application innovation & Developer Productivity
Application innovation & Developer Productivity
Kushan Lahiru Perera
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
 
Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)
AmedJacobReza
 
Lightning In The Clouds
Lightning In The Clouds
george.james
 
COB - Azure Functions for Office 365 developers
COB - Azure Functions for Office 365 developers
Chris O'Brien
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
KMS Technology
 
Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | Salesforce
Rahul Malhotra
 
Designing an effective hybrid apps automation framework
Designing an effective hybrid apps automation framework
Andrea Tino
 
TypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Asp.net Overview and Controllers
Asp.net Overview and Controllers
Mustafa Saeed
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
Alexandre Marreiros
 
Springboot and camel
Springboot and camel
Deepak Kumar
 
Expose web service
Expose web service
Son Nguyen
 
Rise of the responsive single page application
Rise of the responsive single page application
Oren Shatken
 
Live session 2 lightning web component
Live session 2 lightning web component
SmritiSharan1
 
ASP.NET AJAX Basics
ASP.NET AJAX Basics
petrov
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
Mohamed Elkhodary
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTO
Roy Sivan
 
Application innovation & Developer Productivity
Application innovation & Developer Productivity
Kushan Lahiru Perera
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
 
Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)
AmedJacobReza
 
Lightning In The Clouds
Lightning In The Clouds
george.james
 
COB - Azure Functions for Office 365 developers
COB - Azure Functions for Office 365 developers
Chris O'Brien
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
KMS Technology
 

Similar to Implement lazy loading in your existing angular application (get a faster, better and superior performance) (10)

Step by Step Guide on Lazy Loading in Angular 11
Step by Step Guide on Lazy Loading in Angular 11
Katy Slemon
 
lazy loading
lazy loading
srinivaskapa1
 
angular
angular
srinivaskapa1
 
What is Lazy Loading
What is Lazy Loading
srinivaskapa1
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques
Nir Kaufman
 
Angular Lazy Loading and Resolve (Route Resolver)
Angular Lazy Loading and Resolve (Route Resolver)
Squash Apps Pvt Ltd
 
Angular performance slides
Angular performance slides
David Barreto
 
Rethinking Angular Architecture & Performance
Rethinking Angular Architecture & Performance
Mark Pieszak
 
Supercharge Your Angular App: Top Performance Optimization Tips You Can't Miss
Supercharge Your Angular App: Top Performance Optimization Tips You Can't Miss
ISH Technologies
 
Angular Optimization Web Performance Meetup
Angular Optimization Web Performance Meetup
David Barreto
 
Step by Step Guide on Lazy Loading in Angular 11
Step by Step Guide on Lazy Loading in Angular 11
Katy Slemon
 
What is Lazy Loading
What is Lazy Loading
srinivaskapa1
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques
Nir Kaufman
 
Angular Lazy Loading and Resolve (Route Resolver)
Angular Lazy Loading and Resolve (Route Resolver)
Squash Apps Pvt Ltd
 
Angular performance slides
Angular performance slides
David Barreto
 
Rethinking Angular Architecture & Performance
Rethinking Angular Architecture & Performance
Mark Pieszak
 
Supercharge Your Angular App: Top Performance Optimization Tips You Can't Miss
Supercharge Your Angular App: Top Performance Optimization Tips You Can't Miss
ISH Technologies
 
Angular Optimization Web Performance Meetup
Angular Optimization Web Performance Meetup
David Barreto
 
Ad

More from Katy Slemon (20)

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
Katy Slemon
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
Katy Slemon
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
Katy Slemon
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
Katy Slemon
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
Katy Slemon
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
Katy Slemon
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
Katy Slemon
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
Katy Slemon
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Katy Slemon
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
Katy Slemon
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
Katy Slemon
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
Katy Slemon
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdf
Katy Slemon
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
Katy Slemon
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Katy Slemon
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
Katy Slemon
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
Katy Slemon
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
Katy Slemon
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
Katy Slemon
 
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
Katy Slemon
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
Katy Slemon
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
Katy Slemon
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
Katy Slemon
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
Katy Slemon
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
Katy Slemon
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
Katy Slemon
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
Katy Slemon
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Katy Slemon
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
Katy Slemon
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
Katy Slemon
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
Katy Slemon
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdf
Katy Slemon
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
Katy Slemon
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Katy Slemon
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
Katy Slemon
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
Katy Slemon
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
Katy Slemon
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
Katy Slemon
 
Ad

Recently uploaded (20)

FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 

Implement lazy loading in your existing angular application (get a faster, better and superior performance)

  • 1. IMPLEMENT LAZY LOADING IN YOUR EXISTING ANGULAR APPLICATION (GET A FASTER, BETTER AND SUPERIOR PERFORMANCE) www.bacancytechnology.com
  • 2. Angular is a great JavaScript framework of modern-day for building interactive components as well as elements. It is widely used for building SPAs and dynamic programming structure. The front-end framework is based on TypeScript with additional features like interfaces, classes, and static typing that encourages component-based development and make sure that components are decoupled as well as conveniently reusable. Images play a significant role in page-load times, and that’s the reason if you want to improve the performance of your web application, lazy-load images come handy.
  • 3. So, let’s start with what is Lazy Loading?
  • 4. Lazy loading, also known as on-demand loading, is an optimization technique that delays the loading or elements or components until they are brought into the viewport. When you log in to/admin, you will come across a JavaScript code ‘chunk’ specially designed for the Admin dashboard. Likewise, when you load /shop, you will get a similar “chunk,” specially written for the Shop! The code is lazy loaded and injected into the browser for the specific use of the Shop module. main.chunk.js // loaded everywhere shop.chunk.js // lazy module admin.chunk.js // lazy module In a layman’s term, while scrolling any eCommerce website, the bottom images of a page will only be displayed when the user scrolls there.
  • 5. Lazy loading in Angular, why it needs your special attention and importance?
  • 6. It is one of the proven ways to improve the performance of your website. Reduce Page Load Time: Load only requested elements and helps to reduce the amount of data to be loaded. Conserving Bandwidth: Helps to save bandwidth from the viewers as well as a web browser. Deliver only required content and refrain from sending unnecessary content. Save System Resources: Render code only needed. Save memory resources.
  • 7. How to Implement Lazy Loading in Angular? ngx-loadable is a lightweight package for implementing Angular based lazy loading components. It contains a simple API to support loading indicators.
  • 9. Stap 1.  Install ngx-loadable in npm/yarn and add LoadableModule in your AppModule. Stap 2.  To add a module with a bootstrapped, follow the listed below command using Angular CLI. Make sure that module, as well as component names are same.Adding components in the bootstrap is significant as well. Step 3.
  • 10. Step 4. Hovering on the mouse button, you will find that LoginModal Module is pre-loaded. When clicking shows it is still downloading, then LoginModalComponent loads in the ngx- loadable element. Configure ngx-loadable using custom paths. Bypassing configuration to the LoadableModule.
  • 11. Lazy-loading non-routable modules—ngx- loadable is a convenient approach to managing lazy loading. To boost the performance of your application, I strongly recommend it to optimize it step-by- step, instead of doing it all together in one big step. Once you follow the above steps and if you see a chunk, then you have configured it in the right way. If you are not sure about how to do it and looking for the experts who can help you implement lazy loading into your existing app, then hire Angular developers from us. We are a globally renowned Angular development company, offering top-of-the-line Angular development services.