top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

In Angular (2/4/5),What is Lazy Loading and how to use it?

0 votes
In Angular (2/4/5),What is Lazy Loading and how to use it?
posted Dec 27, 2017 by Madhavi Latha

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

What is Lazy Loading?
Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used.

In Angular, Lazy Loading used to load the modules asynchronously. For a large application, Lazy Loading is mainly used. Also, Lazy Loading used to improve the application performance. Because it will load modules whenever required.

So, In angular based on route changes, we can load the modules asynchronously.


Const Route : [
   { path: 'user', loadChildren:'./user/user.module#UserModule' } 

Using LoadChildren We can load the module based on route changes

answer Dec 29, 2017 by Parampreet Kaur
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.